def filter_resource_entities_by_key_value(resource_entities, key, value):
    """
    Filters all resource entities by key and values,
    returns list of resource entities
    """
    found_dicts = [d for d in resource_entities if d[key] == value]
    if not found_dicts:
        raise KeyError(f'resource entities with {key} "{value}" not found')
    return found_dicts