'Efficiently extract the coefficient of a summation.'

def as_coeff_Add(self, rational=False):

    (coeff, args) = (self.args[0], self.args[1:])
    if ((coeff.is_Number and (not rational)) or coeff.is_Rational):
        return (coeff, self._new_rawargs(*args))
    return (S.Zero, self)
