class_docstr: DatasetBuilder for CIFAR-10H dataset.
class_docstr_tok: ["DatasetBuilder","for","CIFAR-10H","dataset","."]
docstr: Returns SplitGenerators.
docstr_tok: ["Returns","SplitGenerators","."]
code: def _split_generators(self, dl_manager):
      """Returns SplitGenerators."""
      cifar_path = dl_manager.download_and_extract(self._cifar_info.url)
      cifar_info = self._cifar_info
  
      cifar_path = os.path.join(cifar_path, cifar_info.prefix)
  
      human_annotations_path = dl_manager.download_and_extract(
          self._cifar_info.human_annotations_url
      )
      human_annotations_file = os.path.join(
          human_annotations_path, "cifar10h-raw.csv"
      )
  
      # Load the label names
      for label_key, label_file in zip(
          cifar_info.label_keys, cifar_info.label_files
      ):
          labels_path = os.path.join(cifar_path, label_file)
          with epath.Path(labels_path).open() as label_f:
              label_names = [
                  name for name in label_f.read().split("\n") if name
              ]
          self.info.features[label_key].names = label_names
  
      # Define the splits
      def gen_filenames(filenames):
          for f in filenames:
              yield os.path.join(cifar_path, f)
  
      return {
          "train": self._generate_examples(
              "train_",
              gen_filenames(cifar_info.train_files),
              human_annotations_file,
          ),
          "test": self._generate_examples(
              "test_",
              gen_filenames(cifar_info.test_files),
              human_annotations_file,
          ),
      }
  
file_path: datasets/tensorflow_datasets/image_classification/cifar10_h/cifar10_h.py
imports: import collections
  import os
  from etils import epath
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import pandas
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Cifar10H obj's underlying member method code with example usage: obj._split_generators(dl_manager) and returns: dict