code: def add_child(parent, tag, text=None):
      
      elem = ET.SubElement(parent, tag)
      if text is not None:
          elem.text = text
      return elem
docs: Add a child element of specified tag type to parent.
      The new child element is returned.