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 'books.db' database, retrieve the relevant data for the genre 'Fantasy', and output an HTML string that lists the top 10 books by sales. If the database connection fails or if the genre specified is not found, the function should return an empty string. The function should handle the database connection and SQL query internally.
  assert generate_top_books_table('Fantasy') == '<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr><tr><td>Book1</td><td>Author1</td><td>Fantasy</td><td>1000</td></tr><tr><td>Book2</td><td>Author2</td><td>Fantasy</td><td>900</td></tr>...<tr><td>Book10</td><td>Author10</td><td>Fantasy</td><td>100</td></tr></table>'
  assert generate_top_books_table('Mystery') == ''
  assert generate_top_books_table('') == ''
  assert generate_top_books_table('NonExistentGenre') == ''
output: def generate_top_books_table(genre):
      import sqlite3
      try:
          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
      except:
          return ''