def count_fn(true_fn_flags, ground_truth_classes, class_code):
    """
    Count how many true FN are left in true_fn_flags for class given by class_code

    Args
        true_fn_flags: list of flags that are left 1 if ground truth has not been detected at all
        ground_truth_classes: list of classes corresponding to the ground truths in true_fn_flags
        class_code: code of class that is of interest
    Returns:
        number of 1s left true_fn_flags that correspond to class given by class_code
    """
    count = 0
    for i in range(len(true_fn_flags)):
        if true_fn_flags[i] == 1 and ground_truth_classes[i] == class_code:
            count += 1

    return count