input: Write a function to generate an XML document in Python using the given list of items. The function should create a root element 'data', and for each item in the input list, it should create a sub-element 'item' within the 'data' element. Finally, the function should write the XML structure to a file named 'data.xml'. If the input list is empty, the function should still create an 'data' element and write an empty XML file named 'data.xml'.
  import xml.etree.ElementTree as ET
  
  def construct_xml_document(items):
      data = ET.Element('data')
      for item in items:
          item_element = ET.SubElement(data, 'item')
          item_element.text = item
      tree = ET.ElementTree(data)
      tree.write('data.xml')
  
  assert construct_xml_document(['Item1', 'Item2', 'Item3'])==None
  assert construct_xml_document([])==None
output: import xml.etree.ElementTree as ET
  
  def construct_xml_document(items):
      data = ET.Element('data')
      for item in items:
          item_element = ET.SubElement(data, 'item')
          item_element.text = item
      tree = ET.ElementTree(data)
      tree.write('data.xml')