def get_real_func(obj):
start_obj = obj<EOL>for i in range(<NUM_LIT:100>):<EOL><INDENT>new_obj = getattr(obj, "<STR_LIT>", None)<EOL>if isinstance(new_obj, _PytestWrapper):<EOL><INDENT>obj = new_obj.obj<EOL>break<EOL><DEDENT>new_obj = getattr(obj, "<STR_LIT>", None)<EOL>if new_obj is None:<EOL><INDENT>break<EOL><DEDENT>obj = new_obj<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>("<STR_LIT>").format(<EOL>start=saferepr(start_obj), current=saferepr(obj)<EOL>)<EOL>)<EOL><DEDENT>if isinstance(obj, functools.partial):<EOL><INDENT>obj = obj.func<EOL><DEDENT>return obj<EOL>
gets the real function object of the (possibly) wrapped object by
    functools.wraps or functools.partial.