input: def create_xml_document(items: List[str]) -> None:
      """ Create an XML document using Python which contains the given list of items as sub-elements.
      Each item should be a sub-element of the root element 'data'.
      >>> create_xml_document(['Item1', 'Item2', 'Item3'])
      The XML document is written to 'data.xml' where each item appears as a sub-element under the root 'data'.
      """
output:     from xml.etree.ElementTree import Element, SubElement, tostring
      from xml.dom.minidom import parseString
  
      root = Element('data')
      for item in items:
          SubElement(root, 'item').text = item
  
      xml_str = tostring(root, encoding='unicode')
      pretty_xml_str = parseString(xml_str).toprettyxml(indent="    ")
  
      with open('data.xml', 'w') as f:
          f.write(pretty_xml_str)