def _to_original_callable(obj):
    while True:
        if (inspect.isfunction(obj) or inspect.isclass(obj)):
            f = inspect.getfile(obj)
            if (f.startswith('<') and f.endswith('>')):
                return None
            return obj
        if inspect.ismethod(obj):
            obj = obj.__func__
        elif isinstance(obj, functools.partial):
            obj = obj.func
        elif isinstance(obj, property):
            obj = obj.fget
        else:
            return None
def _to_original_callable(obj):
    while True:
        if (inspect.isfunction(obj) or inspect.isclass(obj)):
            f = inspect.getfile(obj)
            if (f.startswith('<') and f.endswith('>')):
                return None
            return obj
        if inspect.ismethod(obj):
            obj = obj.__func__
        elif isinstance(obj, functools.partial):
            obj = obj.func
        elif isinstance(obj, property):
            obj = obj.fget
        else:
            return None