code: def blend_models(
      estimator_list: list,
      method: str = "mean",
      fold: Optional[Union[int, Any]] = None,
      round: int = 4,
      choose_better: bool = False,
      optimize: str = "MASE",
      weights: Optional[List[float]] = None,
      fit_kwargs: Optional[dict] = None,
      verbose: bool = True,
  ):
      """
      This function trains a EnsembleForecaster for select models passed in the
      ``estimator_list`` param. Trains a sktime EnsembleForecaster under the hood.
      Refer to it's documentation for more details.
  
  
      Example
      --------
      >>> from pycaret.datasets import get_data
      >>> airline = get_data('airline')
      >>> from pycaret.time_series import *
      >>> exp_name = setup(data = airline,  fh = 12)
      >>> top3 = compare_models(n_select = 3)
      >>> blender = blend_models(top3)
  
  
      estimator_list: list of sktime compatible estimators
          List of model objects
  
  
      method: str, default = 'mean'
          Method to average the individual predictions to form a final prediction.
          Available Methods:
  
          * 'mean' - Mean of individual predictions
          * 'gmean' - Geometric Mean of individual predictions
          * 'median' - Median of individual predictions
          * 'min' - Minimum of individual predictions
          * 'max' - Maximum of individual predictions
  
  
      fold: int or scikit-learn compatible CV generator, default = None
          Controls cross-validation. If None, the CV generator in the ``fold_strategy``
          parameter of the ``setup`` function is used. When an integer is passed,
          it is interpreted as the 'n_splits' parameter of the CV generator in the
          ``setup`` function.
  
  
      round: int, default = 4
          Number of decimal places the metrics in the score grid will be rounded to.
  
  
      choose_better: bool, default = False
          When set to True, the returned object is always better performing. The
          metric used for comparison is defined by the ``optimize`` parameter.
  
  
      optimize: str, default = 'MASE'
          Metric to compare for model selection when ``choose_better`` is True.
  
  
      weights: list, default = None
          Sequence of weights (float or int) to apply to the individual model
          predictons. Uses uniform weights when None. Note that weights only
          apply 'mean', 'gmean' and 'median' methods.
  
  
      fit_kwargs: dict, default = {} (empty dict)
          Dictionary of arguments passed to the fit method of the model.
  
  
      verbose: bool, default = True
          Score grid is not printed when verbose is set to False.
  
  
      Returns:
          Trained Model
      """
      return _CURRENT_EXPERIMENT.blend_models(
          estimator_list=estimator_list,
          fold=fold,
          round=round,
          choose_better=choose_better,
          optimize=optimize,
          method=method,
          weights=weights,
          fit_kwargs=fit_kwargs,
          verbose=verbose,
      )
  
imports: import logging
  import os
  from typing import TYPE_CHECKING, Any, BinaryIO, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from pycaret.internal.parallel.parallel_backend import ParallelBackend
  from pycaret.time_series.forecasting.oop import TSForecastingExperiment
  from pycaret.utils.generic import check_if_global_is_not_none
label_desc: Use image node_id 7 for calling a global function with example usage: blend_models(estimator_list, method, fold, round, choose_better, optimize, weights, fit_kwargs, verbose) and returns: _CURRENT_EXPERIMENT