def get_query_string(query_map):
    """Return the query string given a map of key-value pairs."""
    if query_map:
        query = []
        for (name, values) in query_map.items():
            for value in values:
                query.append(name + "=" + value)
        return "&".join(query)
    return None