input: Write a function to parse the given URL and print out the protocol, domain name, and path using Python. Use the `urllib.parse` module to parse the URL and extract the required components. The function should take a single string parameter representing the URL and should print the protocol, domain name, and path. If the URL is invalid or any part cannot be extracted, print an error message.
  
  assert parse_url('https://www.example.com/path/to/file')==None
  assert parse_url('http://example.com')==None
  assert parse_url('https://www.domain.com/')==None
  assert parse_url('invalid_url')==None
  assert parse_url('')==None
output: try:
      from urllib.parse import urlparse
      parsed_url = urlparse(url)
      if parsed_url.scheme and parsed_url.netloc and parsed_url.path:
          print(f"Protocol: {parsed_url.scheme}")
          print(f"Domain Name: {parsed_url.netloc}")
          print(f"Path: {parsed_url.path}")
      else:
          print("Error: Invalid URL or unable to extract components.")
  except Exception as e:
      print("Error: Invalid URL or unable to extract components.")