code: def iterate(self):
      for annotation in self.annotations:
          if self._stop_iteration():
              return
  
          image_id = annotation["image_id"]
  
          if self._should_skip(image_id):
              continue
  
          try:
              image_path = self._get_image_path(image_id)
              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
  
          image_pil = Image.open(six.BytesIO(image))
          width = image_pil.width
          height = image_pil.height
  
          gt_boxes = []
          for b in annotation[self._objects_key]:
              try:
                  label_id = self.classes.index(
                      b.get("label", self._default_class)
                  )
              except ValueError:
                  continue
  
              gt_boxes.append(
                  {
                      "label": label_id,
                      "xmin": b[self._x_min_key],
                      "ymin": b[self._y_min_key],
                      "xmax": b[self._x_max_key],
                      "ymax": b[self._y_max_key],
                  }
              )
  
          if len(gt_boxes) == 0:
              tf.logging.debug(
                  'Image "{}" has zero valid gt_boxes.'.format(image_id)
              )
              self.errors += 1
              continue
  
          record = {
              "width": width,
              "height": height,
              "depth": 3,
              "filename": image_id,
              "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/flat_reader.py
imports: import json
  import os
  import six
  import tensorflow
  from PIL import Image
  from luminoth.tools.dataset.readers import InvalidDataDirectory
  from luminoth.tools.dataset.readers.object_detection import ObjectDetectionReader
  from luminoth.utils.dataset import read_image
label_desc: Use image node_id 5 for calling the FlatReader obj's underlying member method code with example usage: obj.iterate() without return types