input: Write a function to implement a web scraper in Python that extracts the top ten trending YouTube videos. The function should use the `requests` and `BeautifulSoup` libraries to make a request to the YouTube trending page and parse the content to extract the titles of the top ten videos. If the function successfully retrieves the titles, it should print them. If the function encounters any errors, it should print an error message.
  assert extract_trending_videos()==None
  def extract_trending_videos():
      import requests
      from bs4 import BeautifulSoup
      
      try:
          # make a request to get the page content
          page = requests.get("https://www.youtube.com/feed/trending")
          page.raise_for_status()
          
          # parse the page content
          soup = BeautifulSoup(page.content, 'html.parser')
          
          # extract the list of trending videos
          trending_videos = soup.find_all(class_='expanded-shelf-content-item-wrapper')
          
          # print the top ten trending videos
          for video in trending_videos[:10]:
              print(video.find(class_='yt-uix-tile-link').get('title'))
      
      except requests.exceptions.RequestException as e:
          print(f"An error occurred: {e}")
output: def extract_trending_videos():
      import requests
      from bs4 import BeautifulSoup
      
      try:
          page = requests.get("https://www.youtube.com/feed/trending")
          page.raise_for_status()
          
          soup = BeautifulSoup(page.content, 'html.parser')
          
          trending_videos = soup.find_all(class_='expanded-shelf-content-item-wrapper')
          
          for video in trending_videos[:10]:
              print(video.find(class_='yt-uix-tile-link').get('title'))
      
      except requests.exceptions.RequestException as e:
          print(f"An error occurred: {e}")