code: def _lazy_import(
      name: str,
      globals_=None,
      locals_=None,
      fromlist: tuple[str, ...] = (),
      level: int = 0,
      *,
      error_callback: Optional[Callback],
      success_callback: Optional[Callback],
  ):
      """Mock of `builtins.__import__`."""
      del globals_, locals_  # Unused
  
      if level:
          raise ValueError(
              f"Relative import statements not supported ({name})."
          )
  
      if not fromlist:
          # import x.y.z
          # import x.y.z as z
          # In that case, Python would usually import the entirety of `x` if each
          # submodule is imported in its parent's `__init__.py`. So we do the same.
          root_name = name.split(".")[0]
          return LazyModule.from_cache(
              module_name=root_name,
              error_callback=error_callback,
              success_callback=success_callback,
          )
      # from x.y.z import a, b
      return LazyModule.from_cache(
          module_name=name,
          fromlist=fromlist,
          error_callback=error_callback,
          success_callback=success_callback,
      )
  
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 a global function with example usage: _lazy_import(name, globals_, locals_, fromlist, level) and returns: LazyModule, LazyModule