input: 
  def parse_xml(text):
      """ Given an XML document as a string, parse it and return a list of Tag objects.
      A Tag object contains an id from the tag attribute and a list of values from its subelements.
  
      >>> xml_text = '''<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>'''
      >>> tags = parse_xml(xml_text)
      >>> [(tag.tag_id, tag.values) for tag in tags]
      [('1', ['a', 'b']), ('2', ['c', 'd'])]
      """
  
output:     
      import xml.etree.ElementTree as ET
      from collections import namedtuple
  
      Tag = namedtuple('Tag', ['tag_id', 'values'])
  
      root = ET.fromstring(text)
      tags = []
  
      for child in root.findall('.//*[@id]'):
          tag_id = child.attrib['id']
          values = [subchild.attrib['value'] for subchild in child.findall('.//*[@value]')]
          tags.append(Tag(tag_id, values))
  
      return tags
  