code: def _get_cv_criterion(scorer):
      y_true = np.random.binomial(n=1, p=0.5, size=100)
  
      y_pred_good = y_true
      y_pred_bad = np.random.uniform(0, 1, 100)
  
      score_good = scorer(y_true, y_pred_good)
      score_bad = scorer(y_true, y_pred_bad)
  
      if score_good > score_bad:
          return np.argmax
      elif score_good < score_bad:
          return np.argmin
  
imports: import time
  from copy import deepcopy
  from typing import List
  import numpy
  from sklearn import datasets
  from sklearn.base import BaseEstimator, RegressorMixin, ClassifierMixin
  from sklearn.metrics import r2_score, mean_squared_error, log_loss
  from sklearn.model_selection import cross_val_score, KFold
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier, export_text
  from sklearn.ensemble import GradientBoostingClassifier, GradientBoostingRegressor, RandomForestRegressor
  from imodels.util import checks
  from imodels.util.arguments import check_fit_arguments
  from imodels.util.tree import compute_tree_complexity
label_desc: Use image node_id 1 for calling a global function with example usage: _get_cv_criterion(scorer) and returns: np, np