def extract_best_aligns(aligns_df):
    """Extracts alignments with highest score from the provided alignments
    dataframe.

    """
    mask = aligns_df.groupby('seq_index').agg({'score': 'idxmax'})  # get /!\ FIRST /!\ index of max align score for each sequence
    aligns_df_best = aligns_df.loc[mask['score']].reset_index(drop=True)
    return aligns_df_best