input: Write a function to generate an HTML table from a list of dictionaries.
  assert generate_html_table([{'Name': 'John', 'Age': 30}, {'Name': 'Alice', 'Age': 20}, {'Name': 'Bob', 'Age': 25}]) == "<table><tr><th>Name</th><th>Age</th></tr><tr><td>John</td><td>30</td></tr><tr><td>Alice</td><td>20</td></tr><tr><td>Bob</td><td>25</td></tr></table>"
  assert generate_html_table([{'Name': 'Tom', 'Age': 40}]) == "<table><tr><th>Name</th><th>Age</th></tr><tr><td>Tom</td><td>40</td></tr></table>"
  assert generate_html_table([]) == "<table><tr><th>Name</th><th>Age</th></tr></table>"
output: def generate_html_table(data):
      if not data:
          return "<table><tr><th>Name</th><th>Age</th></tr></table>"
      
      # Extract headers from the first dictionary
      headers = data[0].keys()
      
      # Start the table
      html = "<table>"
      
      # Add the table headers
      html += "<tr>" + "".join(f"<th>{header}</th>" for header in headers) + "</tr>"
      
      # Add the table rows
      for row in data:
          html += "<tr>" + "".join(f"<td>{row[header]}</td>" for header in headers) + "</tr>"
      
      # Close the table
      html += "</table>"
      
      return html