def get_method_owner(meth):
if inspect.ismethod(meth):<EOL><INDENT>if sys.version_info < (<NUM_LIT:3>,<NUM_LIT:0>):<EOL><INDENT>return meth.im_class if meth.im_self is None else meth.im_self<EOL><DEDENT>else:<EOL><INDENT>return meth.__self__<EOL><DEDENT><DEDENT>
Returns the instance owning the supplied instancemethod or
the class owning the supplied classmethod.