'Helper function to update the _optimized_pipeline field.'

def _update_top_pipeline(self):

    if self._pareto_front:
        top_score = (- float('inf'))
        for (pipeline, pipeline_scores) in zip(self._pareto_front.items, reversed(self._pareto_front.keys)):
            if (pipeline_scores.wvalues[1] > top_score):
                self._optimized_pipeline = pipeline
                top_score = pipeline_scores.wvalues[1]
