input: def parse_url(url: str) -> dict:
      """ Given a URL, parse and return a dictionary with the protocol, domain name, and path.
      >>> parse_url('https://www.example.com/path/to/file')
      {'protocol': 'https', 'domain_name': 'www.example.com', 'path': '/path/to/file'}
      >>> parse_url('http://sub.domain.net/directory/')
      {'protocol': 'http', 'domain_name': 'sub.domain.net', 'path': '/directory/'}
      """
      import urllib.parse
      parsed_url = urllib.parse.urlparse(url)
      return {
          'protocol': parsed_url.scheme,
          'domain_name': parsed_url.netloc,
          'path': parsed_url.path
      }
output:     import urllib.parse
      parsed_url = urllib.parse.urlparse(url)
      return {
          'protocol': parsed_url.scheme,
          'domain_name': parsed_url.netloc,
          'path': parsed_url.path
      }