class_docstr: the magical lazy-loading module standing
class_docstr_tok: ["the","magical","lazy-loading","module","standing"]
docstr: lazily compute value for name or raise AttributeError if unknown.
docstr_tok: ["lazily","compute","value","for","name","or","raise","AttributeError","if","unknown","."]
code: def __makeattr(self, name):
      """lazily compute value for name or raise AttributeError if unknown."""
      # print "makeattr", self.__name__, name
      target = None
      if "__onfirstaccess__" in self.__map__:
          target = self.__map__.pop("__onfirstaccess__")
          importobj(*target)()
      try:
          modpath, attrname = self.__map__[name]
      except KeyError:
          if target is not None and name != "__onfirstaccess__":
              # retry, onfirstaccess might have set attrs
              return getattr(self, name)
          raise AttributeError(name)
      else:
          result = importobj(modpath, attrname)
          setattr(self, name, result)
          try:
              del self.__map__[name]
          except KeyError:
              pass  # in a recursive-import situation a double-del can happen
          return result
  
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 the ApiModule obj's underlying member method code with example usage: obj.__makeattr(name) and returns: result, getattr