input: Write a python function to extract article titles, authors, and publish dates from the New York Times homepage using BeautifulSoup.
  assert 'title' in extract_articles_from_nytimes()[0]
  assert 'author' in extract_articles_from_nytimes()[0]
  assert 'publish_date' in extract_articles_from_nytimes()[0]
  assert isinstance(extract_articles_from_nytimes(), list)
output: def extract_articles_from_nytimes():
      import requests
      from bs4 import BeautifulSoup
  
      url = 'https://www.nytimes.com/'
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
  
      articles = []
      for article in soup.find_all('article'):
          title_tag = article.find('h2')
          author_tag = article.find('span', {'class': 'css-1n7hynb'})
          date_tag = article.find('time')
  
          title = title_tag.get_text() if title_tag else 'No title'
          author = author_tag.get_text() if author_tag else 'No author'
          publish_date = date_tag['datetime'] if date_tag and 'datetime' in date_tag.attrs else 'No date'
  
          articles.append({
              'title': title,
              'author': author,
              'publish_date': publish_date
          })
  
      return articles