code: def getBestModel(models, scores, greater_is_better=True):
      """
      Returns the best model from the models list based on the scores from
      the scores list. "Best" means 'max' or 'min' of scores, dependent on greater_is_better
      :param models: List of models returned by fitModels or parameters returned by crossvalModels
      :param scores: List of corresponding scores returned by scoreModels
      :param greater_is_better: Choice between optimizing for greater scores or lesser scores
          Default True means greater and False means lesser
      :return: The best model, with associated hyper-parameters
      """
      if greater_is_better:
          return models[np.argmax(scores)]
      else:
          return models[np.argmin(scores)]
  
file_path: parfit/parfit/score.py
imports: from joblib import Parallel, delayed
  from sklearn.metrics import roc_auc_score
  import numpy
  import warnings
label_desc: Use image node_id 4 for calling a global function with example usage: getBestModel(models, scores, greater_is_better) and returns: models, models