input: from typing import List
  
  def parse_xml(text: str) -> List[Tag]:
      """ Parse an XML document and return a list of Tag objects.
      Each Tag object represents a child element in the XML, containing
      an ID and a list of values from its subchildren.
      >>> 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>''')
      [Tag(tag_id='1', values=['a', 'b']), Tag(tag_id='2', values=['c', 'd'])]
      """
  
  class Tag:
      def __init__(self, tag_id: str):
          self.tag_id = tag_id
          self.values = []
      
      def add_value(self, value: str):
          self.values.append(value)
output:     from xml.etree import ElementTree as ET
  
      root = ET.fromstring(text)
      tags = []
  
      for child in root.findall('.//child1') + root.findall('.//child2'):
          tag_id = child.attrib['id']
          tag = Tag(tag_id)
          for subchild in child:
              tag.add_value(subchild.attrib['value'])
          tags.append(tag)
  
      return tags