def transform_results(results, keys_of_interest):
    '\n    Take a list of results and convert them to a multi valued dictionary. The\n    real world use case is to take values from a list of collections and pass\n    them to a granule search.\n\n    [{key1:value1},{key1:value2},...] -> {"key1": [value1,value2]} ->\n        &key1=value1&key1=value2 ( via expand_query_to_parameters() )\n    '
    params = {}
    for item in results:
        for key in keys_of_interest:
            if (key in item):
                value = item[key]
                if (key in params):
                    params[key].append(value)
                else:
                    params[key] = [value]
    return params
Take a list of results and convert them to a multi valued dictionary. The
real world use case is to take values from a list of collections and pass
them to a granule search.

[{key1:value1},{key1:value2},...] -> {"key1": [value1,value2]} ->
    &key1=value1&key1=value2 ( via expand_query_to_parameters() )
def transform_results(results, keys_of_interest):
    '\n    Take a list of results and convert them to a multi valued dictionary. The\n    real world use case is to take values from a list of collections and pass\n    them to a granule search.\n\n    [{key1:value1},{key1:value2},...] -> {"key1": [value1,value2]} ->\n        &key1=value1&key1=value2 ( via expand_query_to_parameters() )\n    '
    params = {}
    for item in results:
        for key in keys_of_interest:
            if (key in item):
                value = item[key]
                if (key in params):
                    params[key].append(value)
                else:
                    params[key] = [value]
    return params