class_docstr: Module class that surfaces all objects but only performs associated imports when the objects are requested.
code: def __init__(
      self,
      name,
      module_file,
      import_structure,
      module_spec=None,
      extra_objects=None,
  ):
      super().__init__(name)
      self._modules = set(import_structure.keys())
      self._class_to_module = {}
      for key, values in import_structure.items():
          for value in values:
              self._class_to_module[value] = key
      # Needed for autocompletion in an IDE
      self.__all__ = list(import_structure.keys()) + list(
          chain(*import_structure.values())
      )
      self.__file__ = module_file
      self.__spec__ = module_spec
      self.__path__ = [os.path.dirname(module_file)]
      self._objects = {} if extra_objects is None else extra_objects
      self._name = name
      self._import_structure = import_structure
  
imports: import importlib.util
  import operator
  import os
  import sys
  from collections import OrderedDict
  from itertools import chain
  from types import ModuleType
  from typing import Any, Union
  from huggingface_hub.utils import is_jinja_available
  from packaging import version
  from packaging.version import Version, parse
  from .None import logging
label_desc: Use image node_id 1 to create a new _LazyModule object from inherited base classes: ModuleType with example: obj = _LazyModule(name, module_file, import_structure, module_spec, extra_objects)