class_docstr: Inherit this class to test your DatasetCollection class.
  
  You must set the following class attribute:
    * DATASET_COLLECTION_CLASS: class object of DatasetCollection to test.
  
  You may set the following class attribute:
    * VERSION: The version of the DatasetCollection used to run the test.
      Defaults to None (latest version).
    * DATASETS_TO_TEST: List containing the datasets to test existence for. If
      no dataset is specified, the existence of all datasets in the collection
      will be tested.
    * CHECK_DATASETS_VERSION: Whether to check for the existence of the
      versioned datasets in the dataset collection, or for their default
      versions. Defaults to True.
  
  This test case will check for the following:
  - The dataset collection is correctly registered, i.e.
    `tfds.dataset_collection` works.
  - The datasets in the dataset collection exist, i.e. their builder is
    registered in tfds. If DATASETS_TO_TEST is not specified, all datasets in
    the collection will be checked.
docstr: Returns the dataset builder for the requested dataset.
  
  Args:
    ds_reference: The `DatasetReference` containing the information about the
      dataset whose builder is to return.
    check_ds_version: Whether to return the dataset builder relative to a
      specific version of the dataset. If set to False, it will return the
      dataset builder for the latest version. Default is True.
  
  Returns:
    The dataset_builder.DatasetBuilder for the requested dataset.
docstr_tok: ["Returns","the","dataset","builder","for","the","requested","dataset",".","Args",":","ds_reference",":","The","`","DatasetReference","`","containing","the","information","about","the","dataset","whose","builder","is","to","return",".","check_ds_version",":","Whether","to","return","the","dataset","builder","relative","to","a","specific","version","of","the","dataset",".","If","set","to","False",",","it","will","return","the","dataset","builder","for","the","latest","version",".","Default","is","True",".","Returns",":","The","dataset_builder.DatasetBuilder","for","the","requested","dataset","."]
code: def _get_dataset_builder(
      self,
      ds_reference: naming.DatasetReference,
      check_ds_version: bool = True,
  ) -> dataset_builder.DatasetBuilder:
      """Returns the dataset builder for the requested dataset.
  
      Args:
        ds_reference: The `DatasetReference` containing the information about the
          dataset whose builder is to return.
        check_ds_version: Whether to return the dataset builder relative to a
          specific version of the dataset. If set to False, it will return the
          dataset builder for the latest version. Default is True.
  
      Returns:
        The dataset_builder.DatasetBuilder for the requested dataset.
      """
      cls = registered.imported_builder_cls(ds_reference.dataset_name)
      cls = typing.cast(Type[dataset_builder.DatasetBuilder], cls)
      version = ds_reference.version if check_ds_version else None
      return cls(config=ds_reference.config, version=version)
  
file_path: datasets/tensorflow_datasets/testing/dataset_collection_builder_testing.py
imports: import typing
  from typing import List, Optional, Type
  import pytest
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import dataset_collection_builder
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import registered
label_desc: Use image node_id 5 for calling the DatasetCollectionTestBase obj's underlying member method code with example usage: obj._get_dataset_builder(ds_reference, check_ds_version) and returns: cls