def _classOfMethod(methodObject):
 if _PY3:
  return methodObject.__self__.__class__
 return methodObject.im_class

def _classOfMethod ( methodObject ) : if _PY3 : return methodObject . __self__ . __class__ return methodObject . im_class
get the associated class of the given method object .