class_docstr: Reference to a dataset.
  
  Attributes:
    dataset_name: name of the dataset.
    namespace: optional namespace in which this dataset belongs.
    config: optional config to be used in the dataset.
    version: version of the dataset to be used. If `None`, the latest version
      will be loaded. An error is raised if the specified version cannot be
      provided.
    data_dir: Optional data dir where this dataset is located. If None, defaults
      to the value of the environment variable TFDS_DATA_DIR, if set, otherwise
    split_mapping: mapping between split names. If the `DatasetCollection` wants
      to use different split names than the source datasets, then this mapping
      can be used. For example, if the collection uses the split `valid`, but
      this dataset uses the split `validation`, then the `split_mapping` should
      be `{'validation': 'valid'}`.
docstr: Returns the `DatasetReference` for the given TFDS dataset.
docstr_tok: ["Returns","the","`","DatasetReference","`","for","the","given","TFDS","dataset","."]
code: def from_tfds_name(
      cls,
      tfds_name: str,
      split_mapping: Optional[Mapping[str, str]] = None,
      data_dir: Union[
          None, str, os.PathLike
      ] = None,  # pylint: disable=g-bare-generic
  ) -> DatasetReference:
      """Returns the `DatasetReference` for the given TFDS dataset."""
      parsed_name, builder_kwargs = parse_builder_name_kwargs(tfds_name)
      version, config = None, None
      version = builder_kwargs.get("version")
      config = builder_kwargs.get("config")
      return cls(
          dataset_name=parsed_name.name,
          namespace=parsed_name.namespace,
          version=version,
          config=config,
          split_mapping=split_mapping,
          data_dir=data_dir,
      )
  
imports: from __future__ import annotations
  import dataclasses
  import functools
  import os
  import re
  import textwrap
  from typing import Any, Dict, List, Mapping, MutableMapping, Optional, Tuple, Union
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils import version
label_desc: Use image node_id 6 for calling the DatasetReference obj's underlying member method code with example usage: obj.from_tfds_name(cls, tfds_name, split_mapping, data_dir) and returns: cls