input: Write a python function to extract 'title' attributes from XML elements.
  assert extract_attribute('<bookstore><book><title>The Autobiography of Benjamin Franklin</title></book></bookstore>') == ['bookstore: ', 'book: ', 'title: The Autobiography of Benjamin Franklin']
  assert extract_attribute('<library><novel><title>War and Peace</title></novel></library>') == ['library: ', 'novel: ', 'title: War and Peace']
  assert extract_attribute('<store><product><name>Gadget</name><title>Best Gadget</title></product></store>') == ['store: ', 'product: ', 'name: ', 'title: Best Gadget']
output: def extract_attribute(xml_string):
      import xml.etree.ElementTree as ET
      root = ET.fromstring(xml_string)
      
      def recursive_extract(element, path):
          path.append(f"{element.tag}: {element.text if element.tag == 'title' else ''}".strip())
          for child in element:
              recursive_extract(child, path)
      
      result = []
      recursive_extract(root, result)
      return result