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 then 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
      print('Protocol:', protocol)
      print('Domain name:', domain_name)
      print('Path:', path)
  
  assert parse_url('https://www.example.com/path/to/file') is None
  assert parse_url('https://www.another-example.com/another/path') is None
  assert parse_url('') is 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
      print('Protocol:', protocol)
      print('Domain name:', domain_name)
      print('Path:', path)