[docs]defcast_to_run(self,previous_result:pd.DataFrame,*args,**kwargs):logger.info(f"Running passage filter node - {self.__class__.__name__} module...")validate_qa_dataset(previous_result)# find queries columnsassert("query"inprevious_result.columns),"previous_result must have query column."queries=previous_result["query"].tolist()# find contents_list columnsassert("retrieved_contents"inprevious_result.columns),"previous_result must have retrieved_contents column."contents=previous_result["retrieved_contents"].tolist()# find scores columnsassert("retrieve_scores"inprevious_result.columns),"previous_result must have retrieve_scores column."scores=previous_result["retrieve_scores"].tolist()# find ids columnsassert("retrieved_ids"inprevious_result.columns),"previous_result must have retrieved_ids column."ids=previous_result["retrieved_ids"].tolist()returnqueries,contents,scores,ids