def find_annotations(list_filenames, all_annotations):
    """
    Function that generates list of annotations according to the given filenames

    Input:
        list_filenames: List of filenames, that shall be found in all_annotations
        all_annotations: List of dictionaries, containing annotations for all images
    """
    found_annotations = []
    for filename in list_filenames:
        annot = next(
            item for item in all_annotations if item["filename"] == filename)
        found_annotations.append(annot)
    return found_annotations