input: Write a function to parse the given URL and print out the protocol, domain name, and path using Python. The function should take a single string argument representing the URL and use the `urllib.parse` module to extract the components. It should print the protocol, domain name, and path in the specified format. If the URL is invalid or cannot be parsed, the function should handle the error gracefully and print an appropriate message.
  
  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://sub.example.co.uk/test')==('Protocol: http\nDomain name: sub.example.co.uk\nPath: /test')
  assert parse_url('ftp://user:pass@ftp.example.org/download')==('Protocol: ftp\nDomain name: user:pass@ftp.example.org\nPath: /download')
  assert parse_url('https://')==('Invalid URL')
  assert parse_url('www.example.com')==('Invalid URL')
output: try:
      from urllib.parse import urlparse
      parsed_url = urlparse(url)
      if not parsed_url.scheme or not parsed_url.netloc:
          return 'Invalid URL'
      return f'Protocol: {parsed_url.scheme}\nDomain name: {parsed_url.netloc}\nPath: {parsed_url.path}'
  except Exception as e:
      return 'Invalid URL'