code: def _encode_query(query):
      
      if query == '':
          return query
      query_args = []
      for query_kv in query.split('&'):
          k, v = query_kv.split('=')
          query_args.append(k + "=" + quote(v.encode('utf-8')))
      return '&'.join(query_args)
docs: Quote all values of a query string.