def get_mitigations(df, threshold=0.5):
    """Return number of impact mitigations performed."""
    return df[(df['y_prob_1'] > threshold)] \
            .groupby(level=['date_time', 'id_blade']) \
            .size() \
            .size