def coeff(self, element):
        if element == 1:
            return self._get_coeff(self.ring.zero_monom)
        elif isinstance(element, self.ring.dtype):
            terms = list(element.iterterms())
            if len(terms) == 1:
                monom, coeff = terms[0]
                if coeff == self.ring.domain.one:
                    return self._get_coeff(monom)

        raise ValueError("expected a monomial, got %s" % element)
Returns the coefficient that stands next to the given monomial.
dataset/ETHPy150Open sympy/sympy/sympy/polys/rings.py/PolyElement.coeff