code: def importobj(modpath, attrname):
      """imports a module, then resolves the attrname on it"""
      module = __import__(modpath, None, None, ["__doc__"])
      if not attrname:
          return module
  
      retval = module
      names = attrname.split(".")
      for x in names:
          retval = getattr(retval, x)
      return retval
  
file_path: catboost/contrib/python/py/py2/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 4 for calling a global function with example usage: importobj(modpath, attrname) and returns: retval, module