code: def iterate(self):
      for image_id in self._get_record_names():
          if self._stop_iteration():
              # Finish iteration.
              return
  
          if self._should_skip(image_id):
              continue
  
          try:
              annotation_path = self._get_image_annotation(image_id)
              image_path = self._get_image_path(image_id)
  
              # Read both the image and the annotation into memory.
              annotation = read_xml(annotation_path)
              image = read_image(image_path)
          except tf.errors.NotFoundError:
              tf.logging.debug(
                  'Error reading image or annotation for "{}".'.format(
                      image_id
                  )
              )
              self.errors += 1
              continue
  
          gt_boxes = []
  
          for b in annotation["object"]:
              try:
                  label_id = self.classes.index(b["name"])
              except ValueError:
                  continue
  
              gt_boxes.append(
                  {
                      "label": label_id,
                      "xmin": b["bndbox"]["xmin"],
                      "ymin": b["bndbox"]["ymin"],
                      "xmax": b["bndbox"]["xmax"],
                      "ymax": b["bndbox"]["ymax"],
                  }
              )
  
          if len(gt_boxes) == 0:
              continue
  
          record = {
              "width": annotation["size"]["width"],
              "height": annotation["size"]["height"],
              "depth": annotation["size"]["depth"],
              "filename": annotation["filename"],
              "image_raw": image,
              "gt_boxes": gt_boxes,
          }
          self._will_add_record(record)
          self.yielded_records += 1
  
          yield record
  
file_path: luminoth/luminoth/tools/dataset/readers/object_detection/pascalvoc.py
imports: import os
  import tensorflow
  from luminoth.tools.dataset.readers import InvalidDataDirectory
  from luminoth.tools.dataset.readers.object_detection import ObjectDetectionReader
  from luminoth.utils.dataset import read_xml, read_image
label_desc: Use image node_id 9 for calling the PascalVOCReader obj's underlying member method code with example usage: obj.iterate() without return types