def get_reranked_results(self, score_column: str = ResultsFields.reranker_score, 
                            highlight_content_column: str = Columns.field_content):
        """reranks the updated results using the score in score_column

        Args:
            score_column (str, optional): _description_. Defaults to ResultsFields.reranker_score.
        """
        reranked_top = []
        for i,group in self.inputs_df.groupby(ResultsFields.reranked_id):
            group = group.sort_values(score_column, ascending=False).head(self.num_highlights)
            reranked_top.append(group)
        reranked_top = pd.concat(reranked_top).set_index(ResultsFields.reranked_id)
        
        # find out which document is the highest, then do the field as a highlight
        for result in self.results[ResultsFields.hits]:
            rerank_id = result[ResultsFields.reranked_id]
            if self.num_highlights == 1:
                _score = reranked_top.loc[rerank_id][score_column]
            else:
                _score = reranked_top.loc[rerank_id][score_column].values.tolist()
                
            result[ResultsFields.reranker_score] = _score
            _df = reranked_top.loc[rerank_id]
             
            if self.num_highlights == 1:
                _content = [{_df[Columns.original_field_name]:_df[highlight_content_column]}]
            else:
                _content = [{row[Columns.original_field_name]:row[highlight_content_column]} for _, row in _df.iterrows()]

            result[ResultsFields.highlights_reranked] = _content

        self.results[ResultsFields.hits] = sorted(self.results[ResultsFields.hits], key=lambda x:x[ResultsFields.reranker_score], reverse=True)
reranks the updated results using the score in score_column

        Args:
            score_column (str, optional): _description_. Defaults to ResultsFields.reranker_score.
        
src/marqo/s2_inference/reranking/cross_encoders.py