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). If the table is not found, the program should return an empty list.
  
  ### Input:
  URL: https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System
  
  ### Output:
  import requests
  from bs4 import BeautifulSoup
  
  def scrape_planets_info(url):
      page = requests.get(url)
      soup = BeautifulSoup(page.content, 'lxml')
  
      planets_table = soup.find('table', class_='wikitable sortable')
      if not planets_table:
          return []
  
      planets = []
      for row in planets_table.find_all('tr'):
          if row.find('th'):
              continue
          cells = row.find_all('td')
          planets.append({
              'name': cells[0].text,
              'mass': cells[2].text,
              'distance_from_sun': cells[5].text
          })
  
      return planets
  
  print(scrape_planets_info('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System'))
  
  assert scrape_planets_info('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System') != []
  assert scrape_planets_info('https://invalid-url.com') == []
output: def scrape_planets_info(url):
      page = requests.get(url)
      soup = BeautifulSoup(page.content, 'lxml')
  
      planets_table = soup.find('table', class_='wikitable sortable')
      if not planets_table:
          return []
  
      planets = []
      for row in planets_table.find_all('tr'):
          if row.find('th'):
              continue
          cells = row.find_all('td')
          planets.append({
              'name': cells[0].text,
              'mass': cells[2].text,
              'distance_from_sun': cells[5].text
          })
  
      return planets