input: Write a function to implement a web scraper in Python to extract the top ten trending YouTube videos. If the given URL is invalid or the page content is not accessible, return an empty list. If the page content is accessible but no videos are found, return an empty list as well.
  assert your_function("https://www.youtube.com/feed/trending")==["Video Title 1", "Video Title 2", "Video Title 3", "Video Title 4", "Video Title 5", "Video Title 6", "Video Title 7", "Video Title 8", "Video Title 9", "Video Title 10"]
  assert your_function("https://www.invalidurl.com")==[]
  assert your_function("https://www.youtube.com/feed/notrending")==[]
output: def your_function(url):
      try:
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          videos = soup.find_all('a', {'class': 'yt-simple-endpoint style-scope yt-formatted-string'})
          return [video.text for video in videos[:10]]
      except:
          return []