code: def parse_rec(filename):
      """Parse a PASCAL VOC xml file"""
      tree = ET.parse(filename)
      objects = []
      for obj in tree.findall("object"):
          obj_struct = {}
          obj_struct["name"] = obj.find("name").text
          obj_struct["pose"] = obj.find("pose").text
          obj_struct["truncated"] = int(obj.find("truncated").text)
          obj_struct["difficult"] = int(obj.find("difficult").text)
          bbox = obj.find("bndbox")
          obj_struct["bbox"] = [
              int(bbox.find("xmin").text),
              int(bbox.find("ymin").text),
              int(bbox.find("xmax").text),
              int(bbox.find("ymax").text),
          ]
          objects.append(obj_struct)
  
      return objects
  
imports: from __future__ import print_function
  import xml.etree.ElementTree
  import os
  import pickle
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: parse_rec(filename) and returns: objects