code: def crossvalModels(
      model,
      paramGrid,
      X,
      y,
      nfolds=5,
      metric=roc_auc_score,
      predict_proba=True,
      n_jobs=-1,
      verbose=10,
  ):
      """
      Parallelizes fitting and scoring all cross-validation models using all combinations of parameters in paramGrid on provided data.
      :param model: The instantiated model you wish to pass, e.g. LogisticRegression()
      :param paramGrid: The ParameterGrid object created from sklearn.model_selection
      :param X: The independent variable data
      :param y: The response variable data
      :param nfolds: The number of folds you wish to use for cross-validation
      :param metric: The metric you wish to use to score the crossval predictions using
      :param predict_proba: Choice between using 'predict_proba' and 'predict' for scoring routine.
          Default True means predict_proba and False means predict
      :param n_jobs: Number of cores to use in parallelization (defaults to -1: all cores)
      :param verbose: The level of verbosity of reporting updates on parallel process
          Default is 10 (send an update at the completion of each job)
      :return: Returns the grid of mean of cross-validation scores for the specified parameters,
          and the associated paramGrid
      """
      return (
          Parallel(n_jobs=n_jobs, verbose=verbose)(
              delayed(crossvalOne)(
                  model,
                  X,
                  y,
                  params,
                  nfolds,
                  metric,
                  predict_proba,
                  n_jobs,
                  np.ceil(verbose / 10),
              )
              for params in paramGrid
          ),
          list(paramGrid),
      )
  
file_path: parfit/parfit/crossval.py
imports: from joblib import Parallel, delayed
  from sklearn.base import BaseEstimator
  from sklearn.model_selection import StratifiedKFold, LeaveOneOut
  from sklearn.metrics import roc_auc_score
  import numpy
  from .fit import fitOne
  from .score import scoreOne, scoreLeaveOneOut
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: crossvalModels(model, paramGrid, X, y, nfolds, metric, predict_proba, n_jobs, verbose) and returns: Parallel,  list