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: Checks that all the collection's datasets have a valid builder.
docstr_tok: ["Checks","that","all","the","collection","'s","datasets","have","a","valid","builder","."]
code: def test_all_datasets_exist(self, datasets):
      """Checks that all the collection's datasets have a valid builder."""
      # If DATASETS_TO_TEST defined, restrict the scope of the datasets to test.
      if self.DATASETS_TO_TEST:
          datasets_to_test = {
              ds: datasets[ds] for ds in self.DATASETS_TO_TEST
          }
      else:
          datasets_to_test = datasets
  
      for ds, ds_reference in datasets_to_test.items():
          ds_builder = self._get_dataset_builder(
              ds_reference, check_ds_version=self.CHECK_DATASETS_VERSION
          )
          assert isinstance(ds_builder, dataset_builder.DatasetBuilder)
  
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 6 for calling the DatasetCollectionTestBase obj's underlying member method code with example usage: obj.test_all_datasets_exist(datasets) without return types