input: Write a function to parse an XML document and extract item names and prices.
  assert parse_document('<root><items><item><name>Item1</name><price>10.5</price></item><item><name>Item2</name><price>20.75</price></item></items></root>') == [{'name': 'Item1', 'price': '10.5'}, {'name': 'Item2', 'price': '20.75'}]
  assert parse_document('<root><items><item><name>ItemA</name><price>5.0</price></item><item><name>ItemB</name><price>15.25</price></item></items></root>') == [{'name': 'ItemA', 'price': '5.0'}, {'name': 'ItemB', 'price': '15.25'}]
  assert parse_document('<root><items><item><name>Product1</name><price>7.99</price></item><item><name>Product2</name><price>12.49</price></item></items></root>') == [{'name': 'Product1', 'price': '7.99'}, {'name': 'Product2', 'price': '12.49'}]
output: def parse_document(xml):
      import xml.etree.ElementTree as ET
      root = ET.fromstring(xml)
      items = []
      for item in root.findall('.//item'):
          name = item.find('name').text
          price = item.find('price').text
          items.append({'name': name, 'price': price})
      return items