input: Write a function to parse the given URL and print out the protocol, domain name, and path using Python.
  
  def parse_url(url):
      import urllib.parse
      parsed_url = urllib.parse.urlparse(url)
      protocol = parsed_url.scheme
      domain_name = parsed_url.netloc
      path = parsed_url.path
      print('Protocol:', protocol)
      print('Domain name:', domain_name)
      print('Path:', path)
  
  assert parse_url('https://www.example.com/path/to/file')
  assert parse_url('http://sub.domain.com/another/path')
  assert parse_url('ftp://files.server.net/directory/file.txt')
  assert parse_url('https://www.google.com')
  assert parse_url('http://localhost:8080/')
output: def parse_url(url):
      import urllib.parse
      parsed_url = urllib.parse.urlparse(url)
      protocol = parsed_url.scheme
      domain_name = parsed_url.netloc
      path = parsed_url.path
      print('Protocol:', protocol)
      print('Domain name:', domain_name)
      print('Path:', path)