input: Write a python function to scrape article titles and published dates from the New York Times homepage.
  assert scrape_nyt_articles() == [("Title 1", "2023-10-01T00:00:00Z"), ("Title 2", "2023-10-02T00:00:00Z")]
  assert scrape_nyt_articles() == [("Another Title", "2023-10-03T00:00:00Z"), ("More News", "2023-10-04T00:00:00Z")]
output: def scrape_nyt_articles():
      import requests
      from bs4 import BeautifulSoup
      from datetime import datetime
  
      url = "https://www.nytimes.com"
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
  
      articles = []
      for item in soup.find_all('article'):
          title_tag = item.find('h2')
          date_tag = item.find('time')
          if title_tag and date_tag:
              title = title_tag.get_text(strip=True)
              date = date_tag['datetime']
              articles.append((title, date))
  
      return articles