def set_url_query_parameter(url, param_name, param_value):
    if not isinstance(param_name, basestring):
        raise Exception(
            'URL query parameter name must be a string, received %s'
            % param_name)

    scheme, netloc, path, query_string, fragment = urlparse.urlsplit(url)
    query_params = urlparse.parse_qs(query_string)

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

    return urlparse.urlunsplit(
        (scheme, netloc, path, new_query_string, fragment))
delete container
dataset/ETHPy150Open oppia/oppia/utils.py/set_url_query_parameter--crossover with--dataset/ETHPy150Open openstack/swift/test/probe/brain.py/BrainSplitter.delete_container