input: Write a function to parse the given URL and print out the protocol, domain name, and path using Python. If the URL is empty, return None.
  import urllib.parse
  
  def parse_url(url):
      if not url:
          return None
      parsed_url = urllib.parse.urlparse(url)
      protocol = parsed_url.scheme
      domain_name = parsed_url.netloc
      path = parsed_url.path
      return f'Protocol: {protocol}\nDomain name: {domain_name}\nPath: {path}'
  
  assert parse_url('https://www.example.com/path/to/file') == 'Protocol: https\nDomain name: www.example.com\nPath: /path/to/file'
  assert parse_url('http://www.test.com/another/path') == 'Protocol: http\nDomain name: www.test.com\nPath: /another/path'
  assert parse_url('') == None
output: def parse_url(url):
      if not url:
          return None
      parsed_url = urllib.parse.urlparse(url)
      protocol = parsed_url.scheme
      domain_name = parsed_url.netloc
      path = parsed_url.path
      return f'Protocol: {protocol}\nDomain name: {domain_name}\nPath: {path}'