def set_query_parameter(url, param_name, param_value):
    scheme, netloc, path, query_string, fragment = urlsplit(url)
    query_params = parse_qs(query_string)

    query_params[param_name] = [param_value]
    new_query_string = urlencode(query_params, doseq=True)

    return urlunsplit((scheme, netloc, path, new_query_string, fragment))
Determines the value of the 'User-agent' header to use for HTTP requests.
dataset/ETHPy150Open BuongiornoMIP/Reding/reding/tests/utils.py/set_query_parameter--crossover with--dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/tools/appcfg.py/GetUserAgent