code: def getdefiningclass(m, owner_class):
      """Resolves the class (e.g. one of the superclasses) that defined a method."""
      # Normalize bound functions to their respective unbound versions.
      m = _get_unbound_function(m)
      for superclass in reversed(inspect.getmro(owner_class)):
          if hasattr(superclass, m.__name__):
              superclass_m = getattr(superclass, m.__name__)
              if _get_unbound_function(superclass_m) is m:
                  return superclass
              elif hasattr(m, "__self__") and m.__self__ == owner_class:
                  # Python 3 class methods only work this way it seems :S
                  return superclass
      return owner_class
  
file_path: DALI/dali/python/nvidia/dali/_autograph/pyct/inspect_utils.py
imports: import inspect
  import itertools
  import linecache
  import sys
  import threading
  import types
  import six
label_desc: Use image node_id 10 for calling a global function with example usage: getdefiningclass(m, owner_class) and returns: owner_class, superclass, superclass