input: Write a function to implement a web scraper in Python to extract the top ten trending YouTube videos. The function should fetch the HTML content from the YouTube trending page, parse it using BeautifulSoup, and extract the titles of the top ten trending videos. If the request is successful, return the list of video titles; otherwise, return an empty list.
  
  import requests
  from bs4 import BeautifulSoup
  
  def get_top_trending_videos():
      # make a request to get the page content
      try:
          page = requests.get("https://www.youtube.com/feed/trending")
          page.raise_for_status()
      except requests.RequestException:
          return []
  
      # 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')
  
      # return the top ten trending videos or an empty list if not enough videos are found
      return [video.find(class_='yt-uix-tile-link').get('title') for video in trending_videos[:10]] if len(trending_videos) >= 10 else []
  
  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():
      try:
          page = requests.get("https://www.youtube.com/feed/trending")
          page.raise_for_status()
      except requests.RequestException:
          return []
  
      soup = BeautifulSoup(page.content, 'html.parser')
      trending_videos = soup.find_all(class_='expanded-shelf-content-item-wrapper')
  
      return [video.find(class_='yt-uix-tile-link').get('title') for video in trending_videos[:10]] if len(trending_videos) >= 10 else []