code: def get_best_model_id(self):
          
  
          if self.optimize_mode is OptimizeMode.Maximize:
              return max(self.history, key=lambda x: x["metric_value"])["model_id"]
          return min(self.history, key=lambda x: x["metric_value"])["model_id"]
docs: Get the best model_id from history using the metric value