code: def imported_builder_cls(name: str) -> Type[RegisteredDataset]:
      """Returns the Registered dataset class."""
      existing_ds_pkgs = _get_existing_dataset_packages(
          constants.DATASETS_TFDS_SRC_DIR
      )
      if name in existing_ds_pkgs:
          pkg_dir_path, builder_module = existing_ds_pkgs[name]
          cls = importlib.import_module(builder_module).Builder
          cls.pkg_dir_path = pkg_dir_path
          return cls
  
      if name in _ABSTRACT_DATASET_REGISTRY:
          # Will raise TypeError: Can't instantiate abstract class X with abstract
          # methods y, before __init__ even get called
          _ABSTRACT_DATASET_REGISTRY[
              name
          ]()  # pytype: disable=not-callable
          # Alternatively, could manually extract the list of non-implemented
          # abstract methods.
          raise AssertionError(f"Dataset {name} is an abstract class.")
  
      if name not in _DATASET_REGISTRY:
          raise DatasetNotFoundError(f"Dataset {name} not found.")
  
      builder_cls = _DATASET_REGISTRY[name]
      if not _is_builder_available(builder_cls):
          available_types = visibility.get_availables()
          msg = f"Dataset {name} is not available. Only: {available_types}"
          raise PermissionError(msg)
      return builder_cls
  
imports: import abc
  import collections
  import contextlib
  import functools
  import importlib
  import inspect
  import os.path
  from typing import ClassVar, Dict, Iterator, List, Type, Text, Tuple
  from etils import epath
  from tensorflow_datasets.core import constants
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import visibility
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils import resource_utils
label_desc: Use image node_id 8 for calling a global function with example usage: imported_builder_cls(name) and returns: builder_cls, cls