input: Write a python function to retrieve and return the latest articles from a given URL that were published in the last 21 days.
  assert len(get_latest_articles('https://example.com/news')) <= 10
  assert isinstance(get_latest_articles('https://example.com/news'), list)
  assert all(isinstance(article, str) for article in get_latest_articles('https://example.com/news'))
output: import requests
  from bs4 import BeautifulSoup
  from datetime import datetime, timedelta
  
  def get_latest_articles(url):
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      articles = soup.find_all('article')
      
      latest_articles = []
      for article in articles:
          date_str = article.find('time')['datetime']
          article_date = datetime.fromisoformat(date_str)
          
          if datetime.now() - article_date <= timedelta(days=21):
              latest_articles.append(article.find('h2').text)
      
      return latest_articles[:10]