class_docstr: DatasetBuilder for RefCoco datasets.
class_docstr_tok: ["DatasetBuilder","for","RefCoco","datasets","."]
code: def _generate_examples(
      self, dataset, dataset_partition, split, dl_manager
  ):
      refcoco_json = json.loads(
          (dl_manager.manual_dir / "refcoco.json").read_text()
      )
      coco_dir = dl_manager.manual_dir / "coco_train2014"
  
      if dataset == "refcocoplus":
          dataset = "refcoco+"
      if split == tfds.Split.VALIDATION:
          split = "val"
  
      for image_id, example in _generate_examples(
          refcoco_json, dataset, dataset_partition, split
      ):
          example["image"] = coco_dir / example["image_filename"]
          del example["image_filename"]
          yield image_id, example
  
file_path: datasets/tensorflow_datasets/datasets/ref_coco/ref_coco_dataset_builder.py
imports: from __future__ import annotations
  import collections
  import json
  import operator
  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(dataset, dataset_partition, split, dl_manager) without return types