def _normalize_instancemethod(instance_method):
if not hasattr(instance_method, '<STR_LIT>'):<EOL><INDENT>return instance_method<EOL><DEDENT>def _func(*args, **kwargs):<EOL><INDENT>return instance_method(*args, **kwargs)<EOL><DEDENT>_func.__name__ = repr(instance_method)<EOL>return _func<EOL>
wraps(instancemethod) returns a function, not an instancemethod so its repr() is all messed up;
we want the original repr to show up in the logs, therefore we do this trick