code: def config_mod_getattr(mod_dict, globals_):
      def __getattr__(name):
          import importlib
  
          if name in mod_dict:
              mod_name, cls_name = mod_dict[name].rsplit(".", 1)
              mod = importlib.import_module(
                  mod_name, globals_["__name__"]
              )
              cls = globals_[name] = getattr(mod, cls_name)
              return cls
          else:  # pragma: no cover
              raise AttributeError(name)
  
      if sys.version_info[:2] < (3, 7):
          for _mod in mod_dict.keys():
              __getattr__(_mod)
  
      def __dir__():
          return sorted(
              [n for n in globals_ if not n.startswith("_")]
              + list(mod_dict)
          )
  
      globals_.update(
          {
              "__getattr__": __getattr__,
              "__dir__": __dir__,
              "__all__": list(__dir__()),
              "__warningregistry__": dict(),
          }
      )
  
imports: import sys
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: config_mod_getattr(mod_dict, globals_) and returns: sorted, cls