def get_dict_from_list(list_of_dicts, key_value, key='id'):
    '\n    Returns dictionary with key: @prm{key} equal to @prm{key_value} from a\n    list of dictionaries: @prm{list_of_dicts}.\n    '
    for dictionary in list_of_dicts:
        if (dictionary.get(key) == None):
            raise Exception((('No key: ' + key) + ' in dictionary.'))
        if (dictionary.get(key) == key_value):
            return dictionary
    return None
Returns dictionary with key: @prm{key} equal to @prm{key_value} from a
list of dictionaries: @prm{list_of_dicts}.
def get_dict_from_list(list_of_dicts, key_value, key='id'):
    '\n    Returns dictionary with key: @prm{key} equal to @prm{key_value} from a\n    list of dictionaries: @prm{list_of_dicts}.\n    '
    for dictionary in list_of_dicts:
        if (dictionary.get(key) == None):
            raise Exception((('No key: ' + key) + ' in dictionary.'))
        if (dictionary.get(key) == key_value):
            return dictionary
    return None