input: from typing import List
  
  def generate_xml(items: List[str]) -> None:
      """ Constructs an XML document using Python which contains the given list of items.
      Each item in the list will be a child element of the root element 'data'. The XML 
      document will be written to a file named 'data.xml'.
      >>> generate_xml(['Item1', 'Item2', 'Item3'])
      # the function will generate an XML file with contents:
      # <data>
      #     <item>Item1</item>
      #     <item>Item2</item>
      #     <item>Item3</item>
      # </data>
      """
output:     from xml.etree.ElementTree import Element, SubElement, tostring
      from xml.dom.minidom import parseString
  
      root = Element('data')
      for item in items:
          child = SubElement(root, 'item')
          child.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)