input: Write a function to determine if it is possible to create a HTML page that displays a table of contents from the data stored in a database. If it is possible, return "Yes", else return "No". If the database is empty, return "Yes".
  assert can_create_table_of_contents([{"section": "Introduction", "page": 1}, {"section": "Methods", "page": 2}, {"section": "Results", "page": 3}])==True
  assert can_create_table_of_contents([])==True
  assert can_create_table_of_contents([{"section": "Introduction", "page": 1}, {"section": "Methods", "page": 3}, {"section": "Results", "page": 2}])==True
  assert can_create_table_of_contents([{"section": "Introduction", "page": 3}, {"section": "Methods", "page": 2}, {"section": "Results", "page": 1}])==True
  assert can_create_table_of_contents([{"section": "Introduction", "page": 2}, {"section": "Methods", "page": 3}, {"section": "Results", "page": 1}])==True
output: def can_create_table_of_contents(data):
      if not data:
          return "Yes"
      pages = [entry["page"] for entry in data]
      if sorted(pages) == list(range(1, len(pages) + 1)):
          return "Yes"
      return "No"