input: Write a python function to parse a URL and extract its components into a dictionary.
  assert parse_url('https://www.example.com/foo/bar?param1=value1&param2=value2') == {'scheme': 'https', 'host': 'www.example.com', 'path': '/foo/bar', 'query': 'param1=value1&param2=value2'}
  assert parse_url('http://test.com/index.html?search=test') == {'scheme': 'http', 'host': 'test.com', 'path': '/index.html', 'query': 'search=test'}
  assert parse_url('ftp://files.server.com/downloads') == {'scheme': 'ftp', 'host': 'files.server.com', 'path': '/downloads', 'query': ''}
output: def parse_url(url):
      from urllib.parse import urlparse
  
      parsed = urlparse(url)
      return {
          'scheme': parsed.scheme,
          'host': parsed.netloc,
          'path': parsed.path,
          'query': parsed.query
      }