def get_associated_colors_of_groups(reference_colors, asso_matrix):
    return [{reference_colors[i_ref]: asso_matrix[(i_pred, i_ref)] for i_ref in range(asso_matrix.shape[1])} for i_pred in range(asso_matrix.shape[0])]
def get_associated_colors_of_groups(reference_colors, asso_matrix):
    return [{reference_colors[i_ref]: asso_matrix[(i_pred, i_ref)] for i_ref in range(asso_matrix.shape[1])} for i_pred in range(asso_matrix.shape[0])]