class_docstr: Pascal VOC 2007 or 2012.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, data_path, set_name):
      """Yields examples."""
      set_filepath = os.path.join(
          data_path,
          os.path.normpath(
              "VOCdevkit/VOC{}/ImageSets/Main/{}.txt".format(
                  self.builder_config.year, set_name
              )
          ),
      )
      load_annotations = (
          self.builder_config.has_test_annotations or set_name != "test"
      )
      with tf.io.gfile.GFile(set_filepath, "r") as f:
          for line in f:
              image_id = line.strip()
              example = self._generate_example(
                  data_path, image_id, load_annotations
              )
              yield image_id, example
  
file_path: datasets/tensorflow_datasets/object_detection/voc.py
imports: from __future__ import annotations
  import os
  import xml.etree.ElementTree
  import numpy
  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 Voc obj's underlying member method code with example usage: obj._generate_examples(data_path, set_name) without return types