'Returns this function as a complex coordinate.
Examples
>>> from sympy import I
>>> from sympy.abc import x
>>> from sympy.functions import log
>>> log(x).as_real_imag()
(log(Abs(x)), arg(x))
>>> log(I).as_real_imag()
(0, pi/2)
>>> log(1 + I).as_real_imag()
(log(sqrt(2)), pi/4)
>>> log(I*x).as_real_imag()
(log(Abs(x)), arg(I*x))'

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

    from sympy import Abs, arg
    if deep:
        abs = Abs(self.args[0].expand(deep, **hints))
        arg = arg(self.args[0].expand(deep, **hints))
    else:
        abs = Abs(self.args[0])
        arg = arg(self.args[0])
    if hints.get('log', False):
        hints['complex'] = False
        return (log(abs).expand(deep, **hints), arg)
    else:
        return (log(abs), arg)
