'returns a tuple representing a complex number
Examples
>>> from sympy import I
>>> (7 + 9*I).as_real_imag()
(7, 9)
>>> ((1 + I)/(1 - I)).as_real_imag()
(0, 1)
>>> ((1 + 2*I)*(1 + 3*I)).as_real_imag()
(-5, 5)'

def as_real_imag(self, deep=True, **hints):

    (sargs, terms) = (self.args, [])
    (re_part, im_part) = ([], [])
    for term in sargs:
        (re, im) = term.as_real_imag(deep=deep)
        re_part.append(re)
        im_part.append(im)
    return (self.func(*re_part), self.func(*im_part))
