def get_dicts_from_list(list_of_dicts, list_of_key_values, key='id'):
    '\n    Returns list of dictionaries with keys: @prm{key} equal to one from list\n    @prm{list_of_key_values} from a list of dictionaries: @prm{list_of_dicts}.\n    '
    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
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}.
def get_dicts_from_list(list_of_dicts, list_of_key_values, key='id'):
    '\n    Returns list of dictionaries with keys: @prm{key} equal to one from list\n    @prm{list_of_key_values} from a list of dictionaries: @prm{list_of_dicts}.\n    '
    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