input: Write a function to generate an HTML table displaying information about the top 10 bestselling books in a specific genre from a given database. The function should connect to the database, retrieve the data, and format it into an HTML table. If the database does not contain any books in the specified genre, the function should return an empty table.
  
      def generate_top_bestsellers_table(genre: str) -> str:
          import sqlite3
          conn = sqlite3.connect('books.db')
          c = conn.cursor()
          c.execute('''SELECT title, author, genre, sales
          FROM Books
          WHERE genre=?
          ORDER BY sales DESC
          LIMIT 10''', (genre,))
          results = c.fetchall()
          html = '<table>'
          html += '<tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr>'
          for result in results:
              title = result[0]
              author = result[1]
              sales = result[3]
              html += f'<tr><td>{title}</td><td>{author}</td><td>{genre}</td><td>{sales}</td></tr>'
          html += '</table>'
          return html
  
  assert generate_top_bestsellers_table('Fantasy')=='''<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr><tr><td>[Fantasy Book 1]</td><td>[Author 1]</td><td>Fantasy</td><td>10000</td></tr><tr><td>[Fantasy Book 2]</td><td>[Author 2]</td><td>Fantasy</td><td>9000</td></tr><tr><td>[Fantasy Book 3]</td><td>[Author 3]</td><td>Fantasy</td><td>8000</td></tr><tr><td>[Fantasy Book 4]</td><td>[Author 4]</td><td>Fantasy</td><td>7000</td></tr><tr><td>[Fantasy Book 5]</td><td>[Author 5]</td><td>Fantasy</td><td>6000</td></tr><tr><td>[Fantasy Book 6]</td><td>[Author 6]</td><td>Fantasy</td><td>5000</td></tr><tr><td>[Fantasy Book 7]</td><td>[Author 7]</td><td>Fantasy</td><td>4000</td></tr><tr><td>[Fantasy Book 8]</td><td>[Author 8]</td><td>Fantasy</td><td>3000</td></tr><tr><td>[Fantasy Book 9]</td><td>[Author 9]</td><td>Fantasy</td><td>2000</td></tr><tr><td>[Fantasy Book 10]</td><td>[Author 10]</td><td>Fantasy</td><td>1000</td></tr></table>'''
  assert generate_top_bestsellers_table('Mystery')=='''<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr></table>'''
output: def generate_top_bestsellers_table(genre: str) -> str:
      import sqlite3
      conn = sqlite3.connect('books.db')
      c = conn.cursor()
      c.execute('''SELECT title, author, genre, sales
      FROM Books
      WHERE genre=?
      ORDER BY sales DESC
      LIMIT 10''', (genre,))
      results = c.fetchall()
      html = '<table>'
      html += '<tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr>'
      for result in results:
          title = result[0]
          author = result[1]
          sales = result[3]
          html += f'<tr><td>{title}</td><td>{author}</td><td>{genre}</td><td>{sales}</td></tr>'
      html += '</table>'
      return html