class_docstr: A loader that creates a module which defers loading until attribute access.
class_docstr_tok: ["A","loader","that","creates","a","module","which","defers","loading","until","attribute","access","."]
docstr: Make the module load lazily.
docstr_tok: ["Make","the","module","load","lazily","."]
code: def exec_module(self, module):
      """Make the module load lazily."""
      module.__spec__.loader = self.loader
      module.__loader__ = self.loader
      # Don't need to worry about deep-copying as trying to set an attribute
      # on an object would have triggered the load,
      # e.g. ``module.__spec__.loader = None`` would trigger a load from
      # trying to access module.__spec__.
      loader_state = {}
      loader_state["__dict__"] = module.__dict__.copy()
      loader_state["__class__"] = module.__class__
      module.__spec__.loader_state = loader_state
      module.__class__ = _LazyModule
  
imports: from ._abc import Loader
  from ._bootstrap import module_from_spec
  from ._bootstrap import _resolve_name
  from ._bootstrap import spec_from_loader
  from ._bootstrap import _find_spec
  from ._bootstrap_external import MAGIC_NUMBER
  from ._bootstrap_external import _RAW_MAGIC_NUMBER
  from ._bootstrap_external import cache_from_source
  from ._bootstrap_external import decode_source
  from ._bootstrap_external import source_from_cache
  from ._bootstrap_external import spec_from_file_location
  from contextlib import contextmanager
  import _imp
  import functools
  import sys
  import types
  import warnings
label_desc: Use image node_id 5 for calling the LazyLoader obj's underlying member method code with example usage: obj.exec_module(module) without return types