input: Write a function to construct an XML document in Python using the given data. The input is a list of items which needs to be embedded under the root element 'data'. The function should return the XML tree as an ElementTree object. If the input list is empty, the function should return an empty ElementTree object.
  
  assert build_xml(['Item1', 'Item2', 'Item3'])==ET.ElementTree(ET.Element('data', {'item1': 'Item1', 'item2': 'Item2', 'item3': 'Item3'}))
  assert build_xml(['Item1'])==ET.ElementTree(ET.Element('data', {'item1': 'Item1'}))
  assert build_xml([])==ET.ElementTree(ET.Element(''))
  assert build_xml(['I1', 'I2', 'I3', 'I4'])==ET.ElementTree(ET.Element('data', {'item1': 'I1', 'item2': 'I2', 'item3': 'I3', 'item4': 'I4'}))
output: 
  def build_xml(items):
      if not items:
          return ET.ElementTree(ET.Element(''))
      root = ET.Element('data')
      for i, item in enumerate(items, start=1):
          root.set(f'item{i}', item)
      return ET.ElementTree(root)
  