def best_models(nb_models, model, data, algo, max_evals, trials):
    base_minimizer(model, data, algo, max_evals, trials)
    if nb_models < len(trials):
        nb_models = len(trials)
    scores = [trial.get('result').get('loss') for trial in trials]
    cut_off = sorted(scores, reverse=True)[nb_models-1]
    model_list = [trial.get('result').get('model') for trial in trials if trial.get('result').get('loss') >= cut_off]
    return model_list
dataset/ETHPy150Open maxpumperla/hyperas/hyperas/optim.py/best_models/swapped operands of `<`