class_docstr: Module loaded lazily during first call.
class_docstr_tok: ["Module","loaded","lazily","during","first","call","."]
code: def __getattr__(self, name: str) -> Any:
      if name in self.fromlist:
          module_name = f"{self.module_name}.{name}"
          return self.from_cache(
              module_name=module_name,
              module=self.module,
              fromlist=self.fromlist,
              error_callback=self.error_callback,
              success_callback=self.success_callback,
          )
      if self.module is None:  # Load on first call
          try:
              start_import_time = time.perf_counter()
              self.module = importlib.import_module(self.module_name)
              import_time_ms = (
                  time.perf_counter() - start_import_time
              ) * 1000
              if self.success_callback is not None:
                  self.success_callback(
                      import_time_ms=import_time_ms,
                      module=self.module,
                      module_name=self.module_name,
                  )
          except ImportError as exception:
              if self.error_callback is not None:
                  self.error_callback(
                      exception=exception, module_name=self.module_name
                  )
              raise exception
      return getattr(self.module, name)
  
file_path: datasets/tensorflow_datasets/core/utils/lazy_imports_utils.py
imports: from __future__ import annotations
  import builtins
  import contextlib
  import dataclasses
  import functools
  import importlib
  import time
  import types
  from typing import Any, Callable, Iterator, Optional, Tuple
label_desc: Use image node_id 2 for calling the LazyModule obj's underlying member method code with example usage: obj.__getattr__(name) and returns: getattr, self