code: def create_text_dict(t, value=None):
      """
      From an XML element <t>, create a text box dict structure and return it.
      """
      t_width = int(float(t.attrib["width"]))
      t_height = int(float(t.attrib["height"]))
  
      text = {
          "width": t_width,
          "height": t_height,
          "value": value,
          "xmlnode": t,
      }
  
      update_text_dict_pos(
          text,
          pt(int(float(t.attrib["left"])), int(float(t.attrib["top"]))),
      )
  
      return text
  
imports: import xml.etree.ElementTree
  from collections import OrderedDict
  import json
  import struct
  import imghdr
  import numpy
  from .geom import pt, rect
label_desc: Use image node_id 5 for calling a global function with example usage: create_text_dict(t, value) and returns: text