def get_dicts_from_list(list_of_dicts, list_of_key_values, key='id'):
    """
    Returns list of dictionaries with keys: @prm{key} equal to one from list
    @prm{list_of_key_values} from a list of dictionaries: @prm{list_of_dicts}.
    """
    ret = []
    for dictionary in list_of_dicts:
        if dictionary.get(key) == None:
            raise Exception("No key: " + key + " in dictionary.")
        if dictionary.get(key) in list_of_key_values:
            ret.append(dictionary)
    return ret