code: def node2dict(root):
      if root.getchildren():
          val = {}
          for node in root.getchildren():
              chkey, chval = node2dict(node)
              val[chkey] = chval
      else:
          val = root.text
  
      return root.tag, val
  
file_path: luminoth/luminoth/utils/dataset.py
imports: import tensorflow
  from lxml import etree
label_desc: Use image node_id 1 for calling a global function with example usage: node2dict(root) and returns: root,  val