code: def select_best_model(models_score: list):
      print("starting select_best_model:", models_score)
      from clearml import OutputModel, Task
  
      best_model = None
      for m in models_score:
          if not best_model or m["error"] < best_model["error"]:
              best_model = m
  
      print("The best model is {}".format(best_model))
      # lets store it on the pipeline
      best_model = OutputModel(base_model_id=best_model["model_id"])
      # let's make sure we have it
      best_model.connect(task=Task.current_task(), name="best")
  
      print("done select_best_model")
      return best_model.id
  
imports: from clearml import PipelineDecorator, Task
label_desc: Use image node_id 5 for calling a global function with example usage: select_best_model(models_score) and returns: best_model