input: Write a function to parse a given URL and print out the protocol, domain name, and path using Python. If the given URL is empty, return a message stating that the URL is empty.
  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://www.test.com/directory/page') == '''Protocol: http
  Domain name: www.test.com
  Path: /directory/page'''
  assert parse_url('') == 'The URL is empty.'
  assert parse_url('ftp://user:password@host.com:port') == '''Protocol: ftp
  Domain name: user:password@host.com:port
  Path: '''
output: def parse_url(url):
      if not url:
          return 'The URL is empty.'
      parts = url.split('://')
      protocol = parts[0]
      rest = parts[1] if len(parts) > 1 else ''
      domain_name, *path_parts = rest.split('/', 1)
      path = '/' + path_parts[0] if path_parts else ''
      return f'Protocol: {protocol}\nDomain name: {domain_name}\nPath: {path}'