code: def get_dataset_source(
      ds_path: epath.Path,
  ) -> Optional[dataset_sources_lib.DatasetSource]:
      """Returns a `DatasetSource` instance if the given path corresponds to a dataset.
  
      To determine whether the given path contains a dataset, a simple heuristic is
      used that checks whether the path has the following structure:
  
      ```
      <ds_name>/
          <ds_name>.py
      ```
  
      If so, all `.py`, `.txt`, `.tsv`, `.json` files will be added to the package.
  
      Args:
        ds_path: Path of the dataset module
  
      Returns:
        A `DatasetSource` instance if the path matches the expected file structure.
      """
      filter_list = {"__init__.py"}
      suffixes_list = (".txt", ".tsv", ".py", ".json")
  
      def is_interesting_file(fname: str) -> bool:
          return (
              fname.endswith(suffixes_list) and fname not in filter_list
          )
  
      if not ds_path.is_dir():
          return None
      all_filenames = set(f.name for f in ds_path.iterdir())
      if f"{ds_path.name}.py" not in all_filenames:
          return None
  
      return dataset_sources_lib.DatasetSource(
          root_path=ds_path,
          filenames=sorted(
              [
                  fname
                  for fname in all_filenames
                  if is_interesting_file(fname)
              ]
          ),
      )
  
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 2 for calling a global function with example usage: get_dataset_source(ds_path) and returns: dataset_sources_lib, unknown, None, None