class_docstr: Provides a lazy-loaded interface to a Python module, and its submodules. The module will not
  be imported until an attribute is accessed.
docstr: Creates a new top-level lazy module or initializes a nested one.
  
  Args:
      module_name_or_module: Name of module to lazily import, or a module object
          for a nested lazy module.
      import_exc: Custom Exception to raise when an ``ImportError`` occurs. Will only
          be used by the top-level ``lazy_module`` instance, not nested modules
docstr_tok: ["Creates","a","new","top-level","lazy","module","or","initializes","a","nested","one",".","Args",":","module_name_or_module",":","Name","of","module","to","lazily","import",",","or","a","module","object","for","a","nested","lazy","module",".","import_exc",":","Custom","Exception","to","raise","when","an","``","ImportError","``","occurs",".","Will","only","be","used","by","the","top-level","``","lazy_module","``","instance",",","not","nested","modules"]
code: def __init__(
      self,
      module_name_or_module: Union[str, ModuleType],
      import_exc: Optional[Exception] = None,
      post_import_cb: Optional[Callable[[ModuleType], None]] = None,
  ):
      """Creates a new top-level lazy module or initializes a nested one.
  
      Args:
          module_name_or_module: Name of module to lazily import, or a module object
              for a nested lazy module.
          import_exc: Custom Exception to raise when an ``ImportError`` occurs. Will only
              be used by the top-level ``lazy_module`` instance, not nested modules
      """
      if isinstance(
          module_name_or_module, ModuleType
      ):  # pragma: no cover
          self.__module = module_name_or_module
          self.__module_name = self.__module.__name__
      else:
          self.__module = None
          self.__module_name = module_name_or_module
  
      self.__import_exc = import_exc
      self.__post_import_cb = post_import_cb
      self.__submods = {}
  
imports: import importlib
  from types import ModuleType
  from typing import Any, Callable, Optional, Union
label_desc: Use image node_id 1 to create a new lazy_module object  with example: obj = lazy_module(module_name_or_module, import_exc, post_import_cb)