code: def get_qualified_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__
  
imports: import re
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: get_qualified_name(function) and returns: function, function, unknown