input: Write a function to implement a web scraper in Python that extracts the top ten trending YouTube videos. The function should make a request to the YouTube trending page, parse the page content with BeautifulSoup, and extract the titles of the top ten trending videos. If the page cannot be accessed or the titles cannot be found, the function should return an empty list.
  
  def get_top_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')
  
          # extract the titles of the top ten trending videos
          top_ten_titles = [video.find(class_='yt-uix-tile-link').get('title') for video in trending_videos[:10] if video.find(class_='yt-uix-tile-link')]
          return top_ten_titles
      except Exception as e:
          print(f"An error occurred: {e}")
          return []
  
  assert get_top_trending_videos() != []
  assert len(get_top_trending_videos()) <= 10
  assert isinstance(get_top_trending_videos()[0], str)
output: def get_top_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')
          top_ten_titles = [video.find(class_='yt-uix-tile-link').get('title') for video in trending_videos[:10] if video.find(class_='yt-uix-tile-link')]
          return top_ten_titles
      except:
          return []