input: Write a function to parse an XML document and return a list of tag objects. The function should take a string of XML data as input and return a list of Tag objects, where each Tag object represents a tag in the XML structure. Each Tag object should have an attribute `tag_id` representing the ID of the tag and a list `values` containing the values of the sub-tags.
  assert 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('1', ['a', 'b']), Tag('2', ['c', 'd'])]
  assert parse_xml("<xml><root><child1 id='1'><subchild1 value='x'></subchild1></child1></root></xml>") == [Tag('1', ['x'])]
  assert parse_xml("<xml><root></root></xml>") == []
  
  class Tag:
      def __init__(self, tag_id, values=[]):
          self.tag_id = tag_id
          self.values = values
      
      def add_value(self, value):
          self.values.append(value)
      
      def __eq__(self, other):
          return self.tag_id == other.tag_id and self.values == other.values
output: def parse_xml(xml_data):
      from xml.etree import ElementTree as ET
      root = ET.fromstring(xml_data)
      tags = []
      for child in root.findall('.//child1'):
          tag_id = child.get('id')
          values = [subchild.get('value') for subchild in child]
          tags.append(Tag(tag_id, values))
      return tags