input: Write a function to generate an XML document using Python based on a list of items provided. If the input list is empty, the function should generate an XML document with an empty 'data' element. The function should return the XML tree.
  assert generate_xml_document(['Item1', 'Item2', 'Item3']).write('test_data.xml') == None
  assert generate_xml_document([]).write('test_empty_data.xml') == None
output: def generate_xml_document(items):
      from xml.etree.ElementTree import Element, SubElement, ElementTree
      root = Element('data')
      if items:
          for item in items:
              item_elem = SubElement(root, 'item')
              item_elem.text = item
      return ElementTree(root)