class_docstr: The PlantVillage dataset of healthy and unhealthy leaves.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, datapath):
      """Yields examples."""
      for label in _LABELS:
          # The real dataset has spaces and commas in directories (label) names,
          # which causes issues with objfs and fig. The solution is to replace these
          # characters with underscores in fake data directories and then not care
          # whether it's an underscore or that character.
          fuzzy_label = label.replace(" ", "[_ ]").replace(",", "[_,]")
          glob_path = os.path.join(
              datapath,
              "Plant_leave_diseases_dataset_without_augmentation",
              fuzzy_label,
              "*.[jJ][pP][gG]",
          )
          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
  
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 Builder obj's underlying member method code with example usage: obj._generate_examples(datapath) without return types