input: Write a function to scrape the table from the given URL and extract the planet information (name, mass, and distance from the sun). The function should return a list of dictionaries, where each dictionary represents a planet with its name, mass, and distance from the sun. If the table is not found, an empty list should be returned.
  assert scrape_planets_info('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')==[{name, mass, distance_from_sun}, ..]
  assert scrape_planets_info('https://en.wikipedia.org/wiki/Non_Existent_Page')==[]
output: import requests
  from bs4 import BeautifulSoup
  
  def scrape_planets_info(url):
      response = requests.get(url)
      if response.status_code != 200:
          return []
      
      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 = cols[2].get_text(strip=True)
              planets_info.append({'name': name, 'mass': mass, 'distance_from_sun': distance})
      
      return planets_info