input: Write a function to scrape the table at the given URL and extract the planets' information (name, mass, and distance from the sun). The function should return a list of dictionaries where each dictionary contains the name, mass, and distance from the sun of a planet.
  assert scrape_planets('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')
  assert isinstance(scrape_planets('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System'), list)
  assert all(isinstance(item, dict) for item in scrape_planets('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System'))
  assert 'name' in scrape_planets('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')[0]
  assert 'mass' in scrape_planets('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')[0]
  assert 'distance_from_sun' in scrape_planets('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')[0]
output: import requests
  from bs4 import BeautifulSoup
  
  def scrape_planets(url):
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      table = soup.find('table', {'class': 'wikitable'})
      rows = table.find_all('tr')[1:]
      planets = []
      for row in rows:
          cols = row.find_all('td')
          if len(cols) >= 4:
              name = cols[0].get_text(strip=True)
              mass = cols[2].get_text(strip=True)
              distance_from_sun = cols[3].get_text(strip=True)
              planets.append({'name': name, 'mass': mass, 'distance_from_sun': distance_from_sun})
      return planets