class_docstr: CIFAR-10.
class_docstr_tok: ["CIFAR-10","."]
docstr: Generate CIFAR examples as dicts.
  
  Shared across CIFAR-{10, 100}. Uses self._cifar_info as
  configuration.
  
  Args:
    split_prefix (str): Prefix that identifies the split (e.g. "tr" or "te").
    filepaths (list[str]): The files to use to generate the data.
  
  Yields:
    The cifar examples, as defined in the dataset info features.
docstr_tok: ["Generate","CIFAR","examples","as","dicts",".","Shared","across","CIFAR-","{","10",",","100","}",".","Uses","self._cifar_info","as","configuration",".","Args",":","split_prefix","(","str",")",":","Prefix","that","identifies","the","split","(","e.g",".","``","tr","''","or","``","te","''",")",".","filepaths","(","list","[","str","]",")",":","The","files","to","use","to","generate","the","data",".","Yields",":","The","cifar","examples",",","as","defined","in","the","dataset","info","features","."]
code: def _generate_examples(self, split_prefix, filepaths):
      """Generate CIFAR examples as dicts.
  
      Shared across CIFAR-{10, 100}. Uses self._cifar_info as
      configuration.
  
      Args:
        split_prefix (str): Prefix that identifies the split (e.g. "tr" or "te").
        filepaths (list[str]): The files to use to generate the data.
  
      Yields:
        The cifar examples, as defined in the dataset info features.
      """
      label_keys = self._cifar_info.label_keys
      index = 0  # Using index as key since data is always loaded in same order.
      for path in filepaths:
          for labels, np_image in _load_data(path, len(label_keys)):
              record = dict(zip(label_keys, labels))
              # Note: "id" is only provided for the user convenience. To shuffle the
              # dataset we use `index`, so that the sharding is compatible with
              # earlier versions.
              record["id"] = "{}{:05d}".format(split_prefix, index)
              record["image"] = np_image
              yield index, record
              index += 1
  
file_path: datasets/tensorflow_datasets/image_classification/cifar.py
imports: import collections
  import os
  from etils import epath
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 4 for calling the Cifar10 obj's underlying member method code with example usage: obj._generate_examples(split_prefix, filepaths) without return types