input: Write a function to implement a web scraper in Python to extract the top ten trending YouTube videos. The function should make a request to the YouTube trending page, parse the page content using BeautifulSoup, and extract and print the titles of the top ten trending videos. If the function encounters any error during the scraping process, it should return the message "Error occurred while scraping".
  
  def scrape_top_trending_videos():
      try:
          page = requests.get("https://www.youtube.com/feed/trending")
          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 Exception as e:
          return "Error occurred while scraping"
  
  assert scrape_top_trending_videos()=="Error occurred while scraping"
  assert scrape_top_trending_videos()=="Error occurred while scraping"
  assert scrape_top_trending_videos()=="Error occurred while scraping"
  assert scrape_top_trending_videos()=="Error occurred while scraping"
  assert scrape_top_trending_videos()=="Error occurred while scraping"
output: def scrape_top_trending_videos():
      try:
          page = requests.get("https://www.youtube.com/feed/trending")
          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 Exception as e:
          return "Error occurred while scraping"