code: def _codec_error_url_quote(e):
      
      out = _fast_url_quote(e.object[e.start : e.end])
  
      if PY2:
          out = out.decode("utf-8")
  
      return out, e.end
docs: Used in :func:`uri_to_iri` after unquoting to re-quote any
      invalid bytes.