code: def update_text_xmlnode(t, attr, val, round_float=True):
      """
      Set the attribute <attr> to <val> of the XML node connected with text box dict <t>.
      """
      if round_float:
          val = int(round(val))
      t["xmlnode"].attrib[attr] = str(val)
  
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 6 for calling a global function with example usage: update_text_xmlnode(t, attr, val, round_float) without return types