code: def benchmark(
      X,
      y,
      scorer,
      cv,
      estimators,
      preprocessing,
      error_score=None,
      **kwargs,
  ):
      """Benchmark estimators across preprocessing pipelines.
  
      :func:`benchmark` runs cross validation scoring of a set of estimators,
      possible against a set of preprocessing pipelines. Equivalent to ::
  
              evl = Benchmark(**kwargs)
              evl.fit(X, y, scorer, ...)
  
  
      .. versionadded:: 0.2.0
  
      Parameters
      ----------
      X : array-like, shape=[n_samples, n_features]
         input data to preprocess and create folds from.
  
      y : array-like, shape=[n_samples, ]
         training labels.
  
      scorer : function
          a scoring function that follows the Scikit-learn API::
  
              score = scorer(estimator, y_true, y_pred)
  
          A user defines scoring function, ``score = f(y_true, y_pred)`` can be
          made into a scorer by calling on the ML-Ensemble implementation of
          Scikit-learn's ``make_scorer``. NOTE: do **not** use Scikit-learn's
          ``make_scorer`` if the Evaluator is to be pickled. ::
  
              from mlens.metrics import make_scorer
              scorer = make_scorer(scoring_function, **kwargs)
  
      error_score : int, optional
          score to assign when fitting an estimator fails. If ``None``, the
          evaluator will raise an error.
  
      cv : int or obj (default = 2)
          cross validation folds to use. Either pass a ``KFold`` class
          that obeys the Scikit-learn API.
  
      estimators : list or dict, optional
          set of estimators to use. If no preprocessing is desired or if
          only on preprocessing pipeline should apply to all, pass a list of
          estimators. The list can contain elements of named tuples
          (i.e. ``('my_name', my_est)``).
  
          If different estimators should be mapped to preprocessing cases,
          a dictionary that maps estimators to each case should
          be passed: ``{'case_a': list_of_est, ...}``.
  
      preprocessing : dict, optional
          preprocessing cases to consider. Pass a dictionary mapping a
          case name to a preprocessing pipeline. ::
  
              preprocessing = {'case_name': transformer_list,}
  
      **kwargs : optional
          Optional arguments to :class:`~mlens.parallel.base.BaseBackend`.
  
      Returns
      -------
      results : dict
          Summary output that shows data for best mean test scores, such as
          test and train scores, std, fit times, and params.
      """
      evl = Benchmark(**kwargs)
      evl.fit(X, y, scorer, cv, estimators, preprocessing, error_score)
      return evl.results
  
imports: from __future__ import division, with_statement
  import warnings
  import numpy
  from ._base_functions import parse_key, set_job, cat, check_scorer, make_learners, make_tansformers, check_instances
  from ..index import FoldIndex
  from ..parallel import ParallelEvaluation
  from ..parallel.base import BaseBackend, IndexMixin
  from ..metrics import Data, assemble_data
  from ..utils.formatting import _flatten, _check_instances
  from ..utils import print_time, safe_print, assert_correct_format
  from ..externals.joblib import delayed
  from ..externals.sklearn.base import clone
label_desc: Use image node_id 1 for calling a global function with example usage: benchmark(X, y, scorer, cv, estimators, preprocessing, error_score) and returns: evl