input: 
  import xml.etree.ElementTree as ET
  
  def create_xml_document(items: list) -> None:
      """Construct an XML document using Python which contains the given items.
      Each item will be represented as a 'item' sub-element within the root 'data' element.
      The XML document will be written to a file named 'data.xml'.
  
      >>> create_xml_document(['Item1', 'Item2', 'Item3'])
      # Creates an XML file 'data.xml' with the following content:
      # <data>
      #   <item>Item1</item>
      #   <item>Item2</item>
      #   <item>Item3</item>
      # </data>
      """
      # 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:     # 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')