code: def xml_parsing(xml):
      tree = elemTree.parse(xml)
  
      annotations = []  # Initialize the list to store labels
      iter_element = tree.iter(tag="object")
  
      for element in iter_element:
          annotation = {}  # Initialize the dict to store labels
  
          annotation["name"] = element.find(
              "name"
          ).text  # Save the name tag value
  
          box_coords = element.iter(tag="robndbox")
  
          for box_coord in box_coords:
              cx = float(box_coord.find("cx").text)
              cy = float(box_coord.find("cy").text)
              w = float(box_coord.find("w").text)
              h = float(box_coord.find("h").text)
              angle = float(box_coord.find("angle").text)
  
              convertcoodi = addRotatedShape(cx, cy, w, h, angle)
  
              annotation["box_coodi"] = convertcoodi
              annotations.append(annotation)
  
          box_coords = element.iter(tag="bndbox")
  
          for box_coord in box_coords:
              xmin = int(box_coord.find("xmin").text)
              ymin = int(box_coord.find("ymin").text)
              xmax = int(box_coord.find("xmax").text)
              ymax = int(box_coord.find("ymax").text)
              # annotation['bndbox'] = [xmin,ymin,xmax,ymax]
  
              annotation["box_coodi"] = [
                  [xmin, ymin],
                  [xmax, ymin],
                  [xmax, ymax],
                  [xmin, ymax],
              ]
              annotations.append(annotation)
  
      bounds = []
      for i in range(len(annotations)):
          box_info_dict = {"points": None, "text": None, "ignore": None}
  
          box_info_dict["points"] = np.array(
              annotations[i]["box_coodi"]
          )
          if annotations[i]["name"] == "dnc":
              box_info_dict["text"] = "###"
              box_info_dict["ignore"] = True
          else:
              box_info_dict["text"] = annotations[i]["name"]
              box_info_dict["ignore"] = False
  
          bounds.append(box_info_dict)
  
      return bounds
  
imports: import os
  import re
  import itertools
  import cv2
  import time
  import numpy
  import torch
  from torch.autograd import Variable
  from utils.craft_utils import getDetBoxes, adjustResultCoordinates
  from data import imgproc
  from data.dataset import SynthTextDataSet
  import math
  import xml.etree.ElementTree
label_desc: Use image node_id 3 for calling a global function with example usage: xml_parsing(xml) and returns: bounds