def METHOD_NAME(self, trial_job_id, success):
    if success:
        if self.set_best_performance:
            self.completed_best_performance = max(self.completed_best_performance, self.trial_history[-1])
        else:
            self.set_best_performance = True
            self.completed_best_performance = self.trial_history[-1]
        logger.info('Updated completed best performance, trial job id: %s', trial_job_id)
    else:
        logger.info('No need to update, trial job id: %s', trial_job_id)