input: Write a function to scrape the planets information (name, mass, and distance from the sun) from the following URL using the HTTP requests and BeautifulSoup library. The function should parse the HTML content and extract the required information from the table with the class "wikitable sortable".
  
  assert scrape_planets_info('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')==[{'name': 'Mercury', 'mass': '3.3011×10²³ kg', 'distance_from_sun': '57.91 million km'}, {'name': 'Venus', 'mass': '4.8675×10²⁴ kg', 'distance_from_sun': '108.2 million km'}, {'name': 'Earth', 'mass': '5.9724×10²⁴ kg', 'distance_from_sun': '149.6 million km'}, {'name': 'Mars', 'mass': '6.4171×10²³ kg', 'distance_from_sun': '227.9 million km'}]
output: 
  def scrape_planets_info(url):
      import requests
      from bs4 import BeautifulSoup
      
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      table = soup.find('table', {'class': 'wikitable sortable'})
      
      planets_info = []
      rows = table.find_all('tr')[1:]
      
      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_info.append({
                  'name': name,
                  'mass': mass,
                  'distance_from_sun': distance_from_sun
              })
      
      return planets_info
  