I guess i have to guess. Do we need the following simple data extraction?!

```
sage: L = lie_algebras.three_dimensional_by_rank(QQ, 3, names=['E','F','H'])
sage: A = L.pbw_basis()
sage: E, F, H = A.algebra_generators()
sage: expression = E^3*F^2 - F^3*E^2
sage: expression
PBW['E']^3*PBW['F']^2 - PBW['E']^2*PBW['F']^3 + 6*PBW['E']*PBW['F']^2*PBW['H'] - 6*PBW['E']*PBW['F']^2 - 6*PBW['F']*PBW['H']^2 + 6*PBW['F']*PBW['H']
sage: for monomial, coeff in expression:
....: print "Coeff=%3s Monomial=%s" % (coeff, monomial)
....:
Coeff= 6 Monomial=PBW['F']*PBW['H']
Coeff= 1 Monomial=PBW['E']^3*PBW['F']^2
Coeff= 6 Monomial=PBW['E']*PBW['F']^2*PBW['H']
Coeff= -6 Monomial=PBW['F']*PBW['H']^2
Coeff= -6 Monomial=PBW['E']*PBW['F']^2
Coeff= -1 Monomial=PBW['E']^2*PBW['F']^3
sage: fixed_monomial = F*H^2
sage: for monomial, coeff in expression:
....: if monomial == fixed_monomial:
....: print "Coeff=%3s for fixed monomial=%s" % (coeff, fixed_monomial)
....:
sage: for monomial, coeff in expression:
....: if A(monomial) == A(fixed_monomial):
....: print "Coeff=%3s for fixed monomial=%s" % (coeff, fixed_monomial)
....:
....:
Coeff= -6 for fixed monomial=PBW['F']*PBW['H']^2
sage:
```

The above sample code illustrates some ways to proceed and some traps to avoid.

Please post a minimal example of the code that you use, so that can see the exact objects that you look at.

Please provide code that creates an instance of the objects in the question. What is a "PBW" monomial (and a suitable expression) in the given context? And to fix a framework, given the following link, http://doc.sagemath.org/html/en/refer..., which coefficient of which expression is needed? (Providing a concrete situation, best a simple one, with code, with concrete links to mathematical and/or sage objects is always helpful for potential answerers. Not doing this echoes a guessing pyramid among them.) I will post a guessing answer in some seconds...