class_docstr: Subset of the citrus dataset with just leaves.
docstr: Yields examples based on the passed split index.
docstr_tok: ["Yields","examples","based","on","the","passed","split","index","."]
code: def _generate_examples(self, datapath):
      """Yields examples based on the passed split index."""
      for label in _LEAVES_LABELS:
          # The real dataset has spaces in directories (label names), which causes
          # fake data test to fail due objfs not handling whitespace in paths. The
          # solution is to replace spaces with underscores in fake data directories
          # and then not care whether a character is a space or an underscore.
          fuzzy_label = label.replace(" ", "[_ ]")
          glob_path = os.path.join(
              datapath, "Citrus/Leaves", fuzzy_label, "*.png"
          )
          for fpath in tf.io.gfile.glob(glob_path):
              fname = os.path.basename(fpath)
              record = {
                  "image": fpath,
                  "image/filename": fname,
                  "label": label,
              }
              yield "{}/{}".format(label, fname), record
  
file_path: datasets/tensorflow_datasets/image_classification/citrus.py
imports: import os
  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 CitrusLeaves obj's underlying member method code with example usage: obj._generate_examples(datapath) without return types