input: Write a Python program to scrape the table at the following URL and extract the planets information (name, mass, and distance from the sun). Call this function `extract_planets_info`. The function should take a URL as input and return a list of dictionaries, where each dictionary contains the planet's name, mass, and distance from the sun. If the table is empty or cannot be scraped, return an empty list.
  
  assert extract_planets_info('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')==[{'name': 'Mercury', 'mass': '3.3011\u202fx10^23', 'distance_from_sun': '57,909,227\u202fkm'}, {'name': 'Venus', 'mass': '4.8675\u202fx10^24', 'distance_from_sun': '108,209,475\u202fkm'}, {'name': 'Earth', 'mass': '5.97237\u202fx10^24', 'distance_from_sun': '149,598,262\u202fkm'}, {'name': 'Mars', 'mass': '6.4171\u202fx10^23', 'distance_from_sun': '227,943,824\u202fkm'}, {'name': 'Jupiter', 'mass': '1.8982\u202fx10^27', 'distance_from_sun': '778,570,000\u202fkm'}, {'name': 'Saturn', 'mass': '5.6834\u202fx10^26', 'distance_from_sun': '1,433,525,000\u202fkm'}, {'name': 'Uranus', 'mass': '8.6810\u202fx10^25', 'distance_from_sun': '2,872,460,000\u202fkm'}, {'name': 'Neptune', 'mass': '1.02413\u202fx10^26', 'distance_from_sun': '4,495,060,000\u202fkm'}]
  assert extract_planets_info('https://en.wikipedia.org/wiki/Non_Existent_Page')==[]
output: def extract_planets_info(url):
      import requests
      from bs4 import BeautifulSoup
      
      try:
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.content, 'html.parser')
          table = soup.find('table', {'class': 'wikitable'})
          
          if not table:
              return []
          
          rows = table.find_all('tr')
          planets_info = []
          
          for row in rows[1:]:
              cols = row.find_all('td')
              if len(cols) >= 3:
                  name = cols[0].get_text(strip=True)
                  mass = cols[1].get_text(strip=True)
                  distance_from_sun = cols[2].get_text(strip=True)
                  planets_info.append({'name': name, 'mass': mass, 'distance_from_sun': distance_from_sun})
          
          return planets_info
      
      except Exception as e:
          return []