input: Write a function to construct an XML document in Python using xml.etree.ElementTree which contains a list of items provided. If the provided list is empty, the function should create an empty XML document. The function should write the XML document to a file named 'data.xml'.
  
  assert create_xml_document(['Item1', 'Item2', 'Item3'])
  assert create_xml_document([])
  assert create_xml_document(['Apple', 'Banana', 'Orange'])
output: import xml.etree.ElementTree as ET
  
  def create_xml_document(items):
      root = ET.Element("items")
      for item in items:
          ET.SubElement(root, "item").text = item
      tree = ET.ElementTree(root)
      tree.write("data.xml", encoding="utf-8", xml_declaration=True)