code: def make_group(
      indexer,
      estimators,
      preprocessing,
      learner_kwargs=None,
      transformer_kwargs=None,
      name=None,
  ):
      """Creating a :class:`Group` from a set learners and transformers
  
      Utility function for creating mapping a set of estimators and
      preprocessing pipelines to a :class:`Group` of
      :class:`~mlens.parallel.learner.Learner` and
      :class:`~mlens.parallel.learner.Transformer` instances.
  
      Parameters
      ----------
      indexer : instance or None, default = None
          Indexer instance to use. See :obj:`~mlens.index` for details.
  
      estimators : dict of lists or list of estimators.
          If ``preprocessing`` is ``None`` or ``list``, ``estimators`` should
          be a ``list``. The list can either contain estimator instances,
          named tuples of estimator instances, or a combination of both. ::
  
              option_1 = [estimator_1, estimator_2]
              option_2 = [("est-1", estimator_1), ("est-2", estimator_2)]
              option_3 = [estimator_1, ("est-2", estimator_2)]
  
          If different preprocessing pipelines are desired, a dictionary
          that maps estimators to preprocessing pipelines must be passed.
          The names of the estimator dictionary must correspond to the
          names of the estimator dictionary. ::
  
              preprocessing_cases = {"case-1": [trans_1, trans_2].
                                     "case-2": [alt_trans_1, alt_trans_2]}
  
              estimators = {"case-1": [est_a, est_b].
                            "case-2": [est_c, est_d]}
  
          The lists for each dictionary entry can be any of ``option_1``,
          ``option_2`` and ``option_3``.
  
      preprocessing : dict of lists or list, optional, default = None
          preprocessing pipelines for given layer. If
          the same preprocessing applies to all estimators, ``preprocessing``
          should be a list of transformer instances. The list can contain the
          instances directly, named tuples of transformers,
          or a combination of both. ::
  
              option_1 = [transformer_1, transformer_2]
              option_2 = [("trans-1", transformer_1),
                          ("trans-2", transformer_2)]
              option_3 = [transformer_1, ("trans-2", transformer_2)]
  
          If different preprocessing pipelines are desired, a dictionary
          that maps preprocessing pipelines must be passed. The names of the
          preprocessing dictionary must correspond to the names of the
          estimator dictionary. ::
  
              preprocessing_cases = {"case-1": [trans_1, trans_2].
                                     "case-2": [alt_trans_1, alt_trans_2]}
  
              estimators = {"case-1": [est_a, est_b].
                            "case-2": [est_c, est_d]}
  
          The lists for each dictionary entry can be any of ``option_1``,
          ``option_2`` and ``option_3``.
  
      transformer_kwargs : dict, optional
          Keyword arguments to pass to the
          :class:`~mlens.parallel.learner.Transformer` instances.
  
      learner_kwargs : dict, optional
          Keyword arguments to pass to the
          :class:`~mlens.parallel.learner.Learner` instances.
  
      name : str, optional
          Name of group. Should be unique.
  
      """
      preprocessing, estimators = check_instances(
          estimators, preprocessing
      )
  
      if learner_kwargs is None:
          learner_kwargs = {}
      if transformer_kwargs is None:
          transformer_kwargs = {}
  
      transformers = [
          Transformer(
              estimator=Pipeline(tr, return_y=True),
              name=case_name,
              **transformer_kwargs,
          )
          for case_name, tr in preprocessing
      ]
  
      learners = [
          Learner(
              estimator=est,
              preprocess=case_name,
              name=learner_name,
              **learner_kwargs,
          )
          for case_name, learner_name, est in estimators
      ]
  
      group = Group(
          indexer=indexer,
          learners=learners,
          transformers=transformers,
          name=name,
      )
      return group
  
imports: from .base import BaseEstimator
  from .learner import Learner, Transformer
  from ._base_functions import mold_objects, transform
  from ..utils import format_name, check_instances
  from ..utils.formatting import _check_instances
  from ..externals.sklearn.base import clone, BaseEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: make_group(indexer, estimators, preprocessing, learner_kwargs, transformer_kwargs, name) and returns: group