def METHOD_NAME(dataset, config):
    log.info(f"\n**** Stacking Ensemble [sklearn v{sklearn.__version__}] ****\n")
    is_classification = config.type == 'classification'
    X_train, X_test = dataset.train.X_enc, dataset.test.X_enc
    y_train, y_test = dataset.train.y_enc, dataset.test.y_enc
    training_params = {k: v for k, v in config.framework_params.items() if not k.startswith('_')}
    n_jobs = config.framework_params.get('_n_jobs', config.cores)  # useful to disable multicore, regardless of the dataset config
    estimators_params = {e: config.framework_params.get(f'_{e}_params', {}) for e in ['rf', 'gbm', 'linear', 'svc', 'final']}
    log.info("Running Sklearn Stacking Ensemble with a maximum time of {}s on {} cores.".format(config.max_runtime_seconds, n_jobs))
    log.warning("We completely ignore the requirement to stay within the time limit.")
    log.warning("We completely ignore the advice to optimize towards metric: {}.".format(config.metric))
    if is_classification:
        estimator = StackingClassifier(
            estimators=[('rf', RandomForestClassifier(n_jobs=n_jobs, random_state=config.seed, **estimators_params['rf'])),
                        ('gbm', GradientBoostingClassifier(random_state=config.seed, **estimators_params['gbm'])),
                        ('linear', SGDClassifier(n_jobs=n_jobs, random_state=config.seed, **estimators_params['linear'])),
                        # ('svc', LinearSVC(random_state=config.seed, **estimators_params['svc']))
                        ],
            # final_estimator=SGDClassifier(n_jobs=n_jobs, random_state=config.seed, **estimators_params['final']),
            final_estimator=LogisticRegression(n_jobs=n_jobs, random_state=config.seed, **estimators_params['final']),
            stack_method='predict_proba',
            n_jobs=n_jobs,
            **training_params
        )
    else:
        estimator = StackingRegressor(
            estimators=[('rf', RandomForestRegressor(n_jobs=n_jobs, random_state=config.seed, **estimators_params['rf'])),
                        ('gbm', GradientBoostingRegressor(random_state=config.seed, **estimators_params['gbm'])),
                        ('linear', SGDRegressor(random_state=config.seed, **estimators_params['linear'])),
                        ('svc', LinearSVR(random_state=config.seed, **estimators_params['svc']))
                        ],
            # final_estimator=SGDRegressor(random_state=config.seed, **estimators_params['final']),
            final_estimator=LinearRegression(n_jobs=n_jobs, random_state=config.seed, **estimators_params['final']),
            n_jobs=n_jobs,
            **training_params
        )
    with Timer() as training:
        estimator.fit(X_train, y_train)
    predictions = estimator.predict(X_test)
    probabilities = estimator.predict_proba(X_test) if is_classification else None
    return result(output_file=config.output_predictions_file,
                  predictions=predictions,
                  truth=y_test,
                  probabilities=probabilities,
                  target_is_encoded=is_classification,
                  models_count=len(estimator.estimators_) + 1,
                  training_duration=training.duration)