def get_real_method(obj, holder):
    '\n    Attempts to obtain the real function object that might be wrapping ``obj``, while at the same time\n    returning a bound method to ``holder`` if the original object was a bound method.\n    '
    try:
        is_method = hasattr(obj, '__func__')
        obj = get_real_func(obj)
    except Exception:
        return obj
    if (is_method and hasattr(obj, '__get__') and callable(obj.__get__)):
        obj = obj.__get__(holder)
    return obj
Attempts to obtain the real function object that might be wrapping ``obj``, while at the same time
returning a bound method to ``holder`` if the original object was a bound method.
def get_real_method(obj, holder):
    '\n    Attempts to obtain the real function object that might be wrapping ``obj``, while at the same time\n    returning a bound method to ``holder`` if the original object was a bound method.\n    '
    try:
        is_method = hasattr(obj, '__func__')
        obj = get_real_func(obj)
    except Exception:
        return obj
    if (is_method and hasattr(obj, '__get__') and callable(obj.__get__)):
        obj = obj.__get__(holder)
    return obj