input: 
  import xml.etree.ElementTree as ET
  
  def create_xml_document(items: list) -> None:
      """Construct an XML document using Python which contains the given list of items.
      Each item will be added as a sub-element under the root element 'data'.
      >>> create_xml_document(['Item1', 'Item2', 'Item3'])
      """
      # creating the root element
      data = ET.Element('data')
      
      # loop over items
      for item in items:
          # creating sub elements
          item_element = ET.SubElement(data, 'item')
          
          # assign the value for the sub elements
          item_element.text = item
      
      # write the XML Tree
      tree = ET.ElementTree(data)
      tree.write('data.xml')
  
output:     # pretty print the XML
      ET.indent(tree, space="    ")
      tree.write('data.xml', encoding='utf-8', xml_declaration=True)