def get_real_method(obj, holder):
try:<EOL><INDENT>is_method = hasattr(obj, "<STR_LIT>")<EOL>obj = get_real_func(obj)<EOL><DEDENT>except Exception:<EOL><INDENT>return obj<EOL><DEDENT>if is_method and hasattr(obj, "<STR_LIT>") and callable(obj.__get__):<EOL><INDENT>obj = obj.__get__(holder)<EOL><DEDENT>return obj<EOL>
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.