class_docstr: Food-101 Images dataset.
docstr: Generate images and labels for splits.
docstr_tok: ["Generate","images","and","labels","for","splits","."]
code: def _generate_examples(self, json_file_path, image_dir_path):
      """Generate images and labels for splits."""
      with epath.Path(json_file_path).open() as f:
          data = json.loads(f.read())
      for label, images in data.items():
          for image_name in images:
              image = os.path.join(image_dir_path, image_name + ".jpg")
              features = {"image": image, "label": label}
              if self.version > "2.0.0":
                  features["id"] = image_name
              yield image_name, features
  
file_path: datasets/tensorflow_datasets/image_classification/food101.py
imports: import json
  import os
  from etils import epath
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Food101 obj's underlying member method code with example usage: obj._generate_examples(json_file_path, image_dir_path) without return types