def prediction_output_strict(output):
    """
    Function that given the predicted labels, removes sequences that are incorrectly formatted
    Specifically, removed predicted answer spans that start with a 2
    
    Input: array of labels
    Output: array of corrected labels
    """
    corrected_output = []
    prev_label = 0
    for idx, label in enumerate(output):
        if label == 2 and prev_label == 0:
            corrected_output.append(0)
            prev_label = 0
        else:
            corrected_output.append(label)
            prev_label = label
    return corrected_output