code: def _get_example_objects(annon_filepath):
      """Function to get all the objects from the annotation XML file."""
      with tf.io.gfile.GFile(annon_filepath, "r") as f:
          root = xml.etree.ElementTree.parse(f).getroot()
  
          # Disable pytype to avoid attribute-error due to find returning
          # Optional[Element]
          # pytype: disable=attribute-error
          size = root.find("size")
          width = float(size.find("width").text)
          height = float(size.find("height").text)
  
          for obj in root.findall("object"):
              # Get object's label name.
              label = obj.find("name").text.lower()
              # Get objects' pose name.
              pose = obj.find("pose").text.lower()
              is_truncated = obj.find("truncated").text == "1"
              is_difficult = obj.find("difficult").text == "1"
              bndbox = obj.find("bndbox")
              xmax = float(bndbox.find("xmax").text)
              xmin = float(bndbox.find("xmin").text)
              ymax = float(bndbox.find("ymax").text)
              ymin = float(bndbox.find("ymin").text)
              yield {
                  "label": label,
                  "pose": pose,
                  "bbox": tfds.features.BBox(
                      ymin / height,
                      xmin / width,
                      ymax / height,
                      xmax / width,
                  ),
                  "is_truncated": is_truncated,
                  "is_difficult": is_difficult,
              }
  
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 1 for calling a global function with example usage: _get_example_objects(annon_filepath) without return types