input: Write a function to parse an XML document and return a list of tag objects where each tag object contains an ID and a list of values from its subchildren.
  
  def parse_xml(xml_text):
      import xml.etree.ElementTree as ET
      tag_objects = []
      root = ET.fromstring(xml_text)
      for child in root:
          tag = Tag(child.attrib["id"])
          for subchild in child:
              tag.add_value(subchild.attrib["value"])
          tag_objects.append(tag)
      return tag_objects
  
  class Tag:
      def __init__(self, tag_id):
          self.tag_id = tag_id
          self.values = []
      
      def add_value(self, value):
          self.values.append(value)
  
  assert str(parse_xml('<xml><root><child1 id="1"><subchild1 value="a"></subchild1><subchild2 value="b"></subchild2></child1><child2 id="2"><subchild3 value="c"></subchild3><subchild4 value="d"></subchild4></child2></root></xml>')[0]) == "Tag(id=1, values=['a', 'b'])"
  assert str(parse_xml('<xml><root><child1 id="1"><subchild1 value="a"></subchild1><subchild2 value="b"></subchild2></child1><child2 id="2"><subchild3 value="c"></subchild3><subchild4 value="d"></subchild4></child2></root></xml>')[1]) == "Tag(id=2, values=['c', 'd'])"
  assert parse_xml('')[0] == []
  assert str(parse_xml('<xml><root><child1 id="1"><subchild1 value="e"></subchild1></child1></root></xml>')[0]) == "Tag(id=1, values=['e'])"
output: def parse_xml(xml_text):
      import xml.etree.ElementTree as ET
      tag_objects = []
      if not xml_text:
          return []
      root = ET.fromstring(xml_text)
      for child in root:
          tag = Tag(child.attrib["id"])
          for subchild in child:
              tag.add_value(subchild.attrib["value"])
          tag_objects.append(tag)
      return tag_objects
  
  class Tag:
      def __init__(self, tag_id):
          self.tag_id = tag_id
          self.values = []
      
      def add_value(self, value):
          self.values.append(value)