code: def _get_default_config_name(
      builder_dir: epath.Path,
      name: str,
  ) -> Optional[str]:
      """Returns the default config of the given dataset, None if not found."""
      # Search for the DatasetBuilder generation code
      try:
          # Warning: The registered dataset may not match the files (e.g. if
          # the imported datasets has the same name as the generated files while
          # being 2 differents datasets)
          cls = registered.imported_builder_cls(name)
          cls = typing.cast(Type[dataset_builder.DatasetBuilder], cls)
      except registered.DatasetNotFoundError:
          pass
      except PermissionError as e:
          error_msg = (
              f"Permission error when accessing: {builder_dir}: {e}"
          )
          error_utils.add_context(error_msg)
      else:
          # If code found, return the default config
          if cls.BUILDER_CONFIGS:
              return cls.default_builder_config.name
  
      # Otherwise, try to load default config from common metadata
      return dataset_builder.load_default_config_name(
          epath.Path(builder_dir)
      )
  
imports: import functools
  import os
  import typing
  from typing import Any, List, Optional, Tuple, Type
  from etils import epath
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import logging
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.proto import dataset_info_pb2
  from tensorflow_datasets.core.utils import error_utils
  from tensorflow_datasets.core.utils import file_utils
  from tensorflow_datasets.core.utils import version
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 9 for calling a global function with example usage: _get_default_config_name(builder_dir, name) and returns: dataset_builder, cls