def func_name(x):
    return getattr(getattr(x, 'func', x), '__name__', type(x))
Return function name of `x` (if defined) else the `type(x)`.
dataset/ETHPy150Open sympy/sympy/sympy/utilities/misc.py/func_name