'Returns the power of x in a term.'

def _get_pow_x(self, term):

    (xterm, pow_x) = term.as_independent(self.x)[1].as_base_exp()
    if (not xterm.has(self.x)):
        return S.Zero
    return pow_x
