code: def list_ds_packages_for_namespace(
      namespace: str,
      path: epath.Path,
  ) -> List[DatasetPackage]:
      """Returns the dataset names found in a specific directory.
  
      Directories that contain code should have the following structure:
  
      ```
      <path>/
          <dataset0>/
              <dataset0>.py
          <dataset1>/
              <dataset1>.py
          ...
      ```
  
      Additional files or folders which are not detected as datasets will be
      ignored (e.g. `__init__.py`).
  
      Args:
        namespace: Namespace of the datasets
        path: The directory path containing the datasets.
  
      Returns:
        ds_packages: The dataset packages found in the directory (sorted for
          determinism).
  
      Raises:
        FileNotFoundError: If the path cannot be reached.
      """
      if not path.exists():
          # Should be fault-tolerant in the future
          raise FileNotFoundError(f"Could not find datasets at {path}")
  
      all_packages = []
      for ds_path in path.iterdir():
          source = get_dataset_source(ds_path)
          if source:
              pkg = DatasetPackage(
                  name=naming.DatasetName(
                      namespace=namespace, name=ds_path.name
                  ),
                  source=source,
              )
              all_packages.append(pkg)
  
      return all_packages
  
imports: import collections
  import dataclasses
  import datetime
  import functools
  import hashlib
  import json
  import tempfile
  from typing import Any, Iterator, List, Optional, Type
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.community import cache
  from tensorflow_datasets.core.community import dataset_sources
  from tensorflow_datasets.core.community import load
  from tensorflow_datasets.core.community import register_base
  from tensorflow_datasets.core.download import checksums
  from tensorflow_datasets.core.utils import gcs_utils
label_desc: Use image node_id 1 for calling a global function with example usage: list_ds_packages_for_namespace(namespace, path) and returns: all_packages