class_docstr: DatasetBuilder for BeeDataset dataset.
class_docstr_tok: ["DatasetBuilder","for","BeeDataset","dataset","."]
code: def _generate_examples(self, path):
      # Load labels and image path.
      data = json.loads((path / "data.json").read_text())
      indexes = list(data.keys())
      random.shuffle(indexes)
      for name in indexes:
          labels = []
          entry = data[name]
  
          for lbl in ["varroa", "pollen", "wasps", "cooling"]:
              labels.append(1.0 if entry[lbl] else 0.0)
  
          img = path / f"images_{self.builder_config.height}" / name
  
          yield name + str(self.builder_config.height), {
              "input": img,
              "output": {
                  "varroa_output": labels[0],
                  "pollen_output": labels[1],
                  "wasps_output": labels[2],
                  "cooling_output": labels[3],
              },
          }
  
file_path: datasets/tensorflow_datasets/datasets/bee_dataset/bee_dataset_dataset_builder.py
imports: from __future__ import annotations
  import json
  import random
  import numpy
  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(path) without return types