code: def add_params_to_uri(uri, params, fragment=False):
      
      sch, net, path, par, query, fra = urlparse.urlparse(uri)
      if fragment:
          fra = add_params_to_qs(fra, params)
      else:
          query = add_params_to_qs(query, params)
      return urlparse.urlunparse((sch, net, path, par, query, fra))
docs: Add a list of two-tuples to the uri query components.