https://github.com/sympy/sympy/blob/master/sympy/utilities/decorator.py#L128