def get_meth_class_inst(obj):
 if PY2:
  return obj.im_self
 else:
  return obj.__self__

def get_meth_class_inst ( obj ) : if PY2 : return obj . im_self else : return obj . __self__
return method class instance .