code: def AliasModule(modname, modpath, attrname=None):
      mod = []
  
      def getmod():
          if not mod:
              x = importobj(modpath, None)
              if attrname is not None:
                  x = getattr(x, attrname)
              mod.append(x)
          return mod[0]
  
      x = modpath + ("." + attrname if attrname else "")
      repr_result = "<AliasModule {!r} for {!r}>".format(modname, x)
  
      class AliasModule(ModuleType):
          def __repr__(self):
              return repr_result
  
          def __getattribute__(self, name):
              try:
                  return getattr(getmod(), name)
              except ImportError:
                  if modpath == "pytest" and attrname is None:
                      # hack for pylibs py.test
                      return None
                  else:
                      raise
  
          def __setattr__(self, name, value):
              setattr(getmod(), name, value)
  
          def __delattr__(self, name):
              delattr(getmod(), name)
  
      return AliasModule(str(modname))
  
file_path: catboost/contrib/python/py/py3/py/_vendored_packages/apipkg/__init__.py
imports: import os
  import sys
  from types import ModuleType
  from .version import version
label_desc: Use image node_id 5 for calling a global function with example usage: AliasModule(modname, modpath, attrname) and returns: AliasModule, mod, repr_result, getattr, None