code: def _urlendecode(url, func):
      
      parsed = urlparse(url)
      for attr in URL_ENCODABLE_PARTS:
          parsed = parsed._replace(**{attr: func(getattr(parsed, attr))})
      return urlunparse(parsed)
docs: Encode or decode ``url`` by applying ``func`` to all of its
      URL-encodable parts.