code: def normalizeURL(url):
      
      try:
          normalized = urinorm.urinorm(url)
      except ValueError as why:
          raise DiscoveryFailure('Normalizing identifier: %s' % (why, ), None)
      else:
          return urllib.parse.urldefrag(normalized)[0]
docs: Normalize a URL, converting normalization failures to
      DiscoveryFailure