input: Write a python function to generate an HTML file displaying WordPress blog posts in a table.
  assert generate_html_from_blog_posts('https://example.wordpress.com/wp-json/wp/v2/posts') == None  # Check that the function runs without returning anything
  assert os.path.exists('posts.html') == True  # Check that the HTML file is created
output: import requests
  import os
  
  def generate_html_from_blog_posts(url):
      response = requests.get(url)
      posts = response.json()
  
      html_content = '''
      <html>
      <head>
          <title>WordPress Blog Posts</title>
          <style>
              table {
                  width: 100%;
                  border-collapse: collapse;
              }
              table, th, td {
                  border: 1px solid black;
              }
              th, td {
                  padding: 15px;
                  text-align: left;
              }
              th {
                  background-color: #f2f2f2;
              }
          </style>
      </head>
      <body>
          <h1>WordPress Blog Posts</h1>
          <table>
              <tr>
                  <th>Title</th>
                  <th>Date</th>
                  <th>Content</th>
              </tr>
      '''
      
      for post in posts:
          title = post['title']['rendered']
          date = post['date']
          content = post['content']['rendered']
          html_content += f'''
              <tr>
                  <td>{title}</td>
                  <td>{date}</td>
                  <td>{content}</td>
              </tr>
          '''
      
      html_content += '''
          </table>
      </body>
      </html>
      '''
  
      with open('posts.html', 'w') as file:
          file.write(html_content)