input: Write a function that generates an HTML table displaying information about the top 10 bestselling books in a specific genre from a given database. The function should connect to an SQLite database named 'books.db', retrieve the data for books in the specified genre ordered by sales in descending order, and generate an HTML table with columns for the title, author, genre, and sales. The function should return the generated HTML code as a string.
  
  assert generate_html_table_for_bestsellers("Fantasy") == '''<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr><tr><td>Example Title 1</td><td>Example Author 1</td><td>Fantasy</td><td>1000</td></tr><tr><td>Example Title 2</td><td>Example Author 2</td><td>Fantasy</td><td>900</td></tr><tr><td>Example Title 3</td><td>Example Author 3</td><td>Fantasy</td><td>800</td></tr><tr><td>Example Title 4</td><td>Example Author 4</td><td>Fantasy</td><td>700</td></tr><tr><td>Example Title 5</td><td>Example Author 5</td><td>Fantasy</td><td>600</td></tr><tr><td>Example Title 6</td><td>Example Author 6</td><td>Fantasy</td><td>500</td></tr><tr><td>Example Title 7</td><td>Example Author 7</td><td>Fantasy</td><td>400</td></tr><tr><td>Example Title 8</td><td>Example Author 8</td><td>Fantasy</td><td>300</td></tr><tr><td>Example Title 9</td><td>Example Author 9</td><td>Fantasy</td><td>200</td></tr><tr><td>Example Title 10</td><td>Example Author 10</td><td>Fantasy</td><td>100</td></tr></table>'''
  assert generate_html_table_for_bestsellers("Mystery") == '''<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr><tr><td>Mystery Title 1</td><td>Mystery Author 1</td><td>Mystery</td><td>1200</td></tr><tr><td>Mystery Title 2</td><td>Mystery Author 2</td><td>Mystery</td><td>1100</td></tr><tr><td>Mystery Title 3</td><td>Mystery Author 3</td><td>Mystery</td><td>1000</td></tr><tr><td>Mystery Title 4</td><td>Mystery Author 4</td><td>Mystery</td><td>900</td></tr><tr><td>Mystery Title 5</td><td>Mystery Author 5</td><td>Mystery</td><td>800</td></tr><tr><td>Mystery Title 6</td><td>Mystery Author 6</td><td>Mystery</td><td>700</td></tr><tr><td>Mystery Title 7</td><td>Mystery Author 7</td><td>Mystery</td><td>600</td></tr><tr><td>Mystery Title 8</td><td>Mystery Author 8</td><td>Mystery</td><td>500</td></tr><tr><td>Mystery Title 9</td><td>Mystery Author 9</td><td>Mystery</td><td>400</td></tr><tr><td>Mystery Title 10</td><td>Mystery Author 10</td><td>Mystery</td><td>300</td></tr></table>'''
  assert generate_html_table_for_bestsellers("Non-existent-genre") == ''
output: def generate_html_table_for_bestsellers(genre):
      import sqlite3
      conn = sqlite3.connect('books.db')
      cursor = conn.cursor()
      cursor.execute("SELECT title, author, genre, sales FROM books WHERE genre=? ORDER BY sales DESC LIMIT 10", (genre,))
      rows = cursor.fetchall()
      conn.close()
      
      if not rows:
          return ''
      
      html = '<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr>'
      for row in rows:
          html += f'<tr><td>{row[0]}</td><td>{row[1]}</td><td>{row[2]}</td><td>{row[3]}</td></tr>'
      html += '</table>'
      return html