def format_for_model(results_df: pd.DataFrame, searchable_fields: List[str], query: str = None):
        """formats the converted results dataframe into something that goes to the models. 
           self.results_to_df needs to be called to provide the input

        Args:
            results_df (pd.DataFrame): _description_
            searchable_fields (List[str]): _description_
            query (str, optional): _description_. Defaults to None.

        Returns:
            _type_: _description_
        """
        # we want the output here to be tuples of the attribute content,query, id and attribute that was used
        # the first two will go to the model while the latter will be used to report the results
        
        # the number 1.0 is arbitrary to some degree (depends on how scores get combined)
        if ResultsFields.original_score not in results_df:
            results_df[ResultsFields.original_score] = 1.0

        inputs = []
        for field in searchable_fields:
            _inputs_df = results_df[[field, ResultsFields.reranked_id, ResultsFields.original_score]]
            _inputs_df[Columns.field_name] = field

            # this is the case if we have some documents that do not have all the fields, 
            # the empty fields go to nan when converted to pandas
            _inputs_df = _inputs_df[_inputs_df[field].notna()] 

            if len(_inputs_df) > 0:
                
                _inputs_df[Columns.query] = query

                # we keep it in case we want to do hybrid search
                # the number 1.0 is arbitrary to some degree (depends on how scores get combined)
                if ResultsFields.original_score not in _inputs_df:
                    _inputs_df[ResultsFields.original_score] = 1.0

                fields_to_keep = [Columns.query, field, ResultsFields.reranked_id, Columns.field_name, ResultsFields.original_score]

                inputs += _inputs_df[fields_to_keep].values.tolist()
            
        inputs_df = pd.DataFrame(inputs, columns=[Columns.query, Columns.field_content, ResultsFields.reranked_id, Columns.original_field_name,  ResultsFields.original_score])
        
        return inputs_df
formats the converted results dataframe into something that goes to the models. 
           self.results_to_df needs to be called to provide the input

        Args:
            results_df (pd.DataFrame): _description_
            searchable_fields (List[str]): _description_
            query (str, optional): _description_. Defaults to None.

        Returns:
            _type_: _description_
        
src/marqo/s2_inference/reranking/cross_encoders.py