input: Write a python function to extract data from an HTML table using BeautifulSoup.
  assert extract_table_data(html) == [{'Name': 'Jane Doe', 'Age': '22', 'Location': 'Paris'}, {'Name': 'John Smith', 'Age': '25', 'Location': 'London'}]
output: def extract_table_data(html):
      from bs4 import BeautifulSoup
      
      soup = BeautifulSoup(html, 'html.parser')
      table = soup.find('table')
      headers = [header.text for header in table.find_all('th')]
      rows = table.find_all('tr')[1:]
      
      data = []
      for row in rows:
          cells = row.find_all('td')
          entry = {headers[i]: cells[i].text for i in range(len(cells))}
          data.append(entry)
      
      return data