def METHOD_NAME(function):
  # Python 3
  if hasattr(function, '__qualname__'):
    return function.__qualname__
  # Python 2
  if hasattr(function, 'im_class'):
    return function.im_class.__name__ + '.' + function.__name__
  return function.__name__