input: Write a function to parse the given URL and print out the protocol, domain name, and path using Python. If the given URL is invalid or empty, return None for each of the components.
  assert parse_url('https://www.example.com/path/to/file')=={'Protocol': 'https', 'Domain name': 'www.example.com', 'Path': '/path/to/file'}
  assert parse_url('http://invalid-url')=={'Protocol': 'http', 'Domain name': 'invalid-url', 'Path': ''}
  assert parse_url('')=={'Protocol': None, 'Domain name': None, 'Path': None}
  assert parse_url(None)=={'Protocol': None, 'Domain name': None, 'Path': None}
output: def parse_url(url):
      if not url:
          return {'Protocol': None, 'Domain name': None, 'Path': None}
      try:
          parsed_url = urlparse(url)
          protocol = parsed_url.scheme
          domain_name = parsed_url.netloc
          path = parsed_url.path
          return {'Protocol': protocol, 'Domain name': domain_name, 'Path': path}
      except:
          return {'Protocol': None, 'Domain name': None, 'Path': None}