input: Write a function to generate an XML document that includes a list of items provided as input. The function should create an XML structure with a root element named "data" and sub-elements named "item" for each item in the input list. The function should then write this XML structure to a file named "data.xml".
  assert generate_xml(['Item1', 'Item2', 'Item3']) is None
  assert generate_xml([]) is None
output: def generate_xml(items):
      root = ET.Element("data")
      for item in items:
          ET.SubElement(root, "item").text = item
      tree = ET.ElementTree(root)
      tree.write("data.xml", encoding="utf-8", xml_declaration=True)