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, and extract the titles of the top ten trending videos. If less than ten videos are available, it should print all available videos.
  assert extract_top_ten_trending() is not None
  assert len(extract_top_ten_trending()) <= 10
output: 
  def extract_top_ten_trending():
      import requests
      from bs4 import BeautifulSoup
      url = "https://www.youtube.com/feed/trending"
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      titles = []
      for video in soup.find_all('a', {'id': 'video-title'})[:10]:
          titles.append(video.get_text().strip())
      return titles
  