class_docstr: Structure containing information required to fetch a dataset.
  
  Attributes:
    root_path: Root directory of the dataset package (e.g.
      `gs://.../my_dataset/`, `github://.../my_dataset/`)
    filenames: Content of the dataset package
docstr: Imports from JSON.
docstr_tok: ["Imports","from","JSON","."]
code: def from_json(cls, value: utils.JsonValue) -> "DatasetSource":
      """Imports from JSON."""
      if isinstance(
          value, str
      ):  # Single-file dataset ('.../my_dataset.py')
          path = epath.Path(value)
          return cls(root_path=path.parent, filenames=[path.name])
      elif isinstance(value, dict):  # Multi-file dataset
          return cls(
              root_path=epath.Path(value["root_path"]),
              filenames=value["filenames"],
          )
      else:
          raise ValueError(f"Invalid input: {value}")
  
file_path: datasets/tensorflow_datasets/core/community/dataset_sources.py
imports: import dataclasses
  import os
  from typing import List
  from etils import epath
  from tensorflow_datasets.core import utils
label_desc: Use image node_id 1 for calling the DatasetSource obj's underlying member method code with example usage: obj.from_json(cls, value) and returns: cls, cls