input: Write a function to create a web scraper using Python that retrieves the 10 most recent articles from a news website. The function should take a URL as input and print the text from the first 10 articles found on that page. Use the `requests` and `BeautifulSoup` libraries for this purpose.
  
  
  def scrape_news_articles(URL):
      import requests
      from bs4 import BeautifulSoup
      
      # get the source code
      html_content = requests.get(URL).text
      
      # parse the html content
      soup = BeautifulSoup(html_content, "lxml")
      
      # get all the articles
      articles = soup.find_all('article')
      
      # print the first 10 articles
      for article in articles[:10]:
          print(article.text)
  
  # Example usage
  scrape_news_articles('http://example.com/news')
  
  
  assert "Example article text" in scrape_news_articles('http://example.com/news')
  assert "Another example article text" in scrape_news_articles('http://example.com/news')
  assert "Yet another example article text" in scrape_news_articles('http://example.com/news')
  assert scrape_news_articles('http://nonexistenturl.com') == []
  assert scrape_news_articles('http://example.com/news') != []
output: def scrape_news_articles(URL):
      import requests
      from bs4 import BeautifulSoup
      
      try:
          html_content = requests.get(URL).text
          soup = BeautifulSoup(html_content, "lxml")
          articles = soup.find_all('article')
          for article in articles[:10]:
              print(article.text)
      except:
          pass