class_docstr: Stack ensemble meta-model which functions identically to :class:`BaggedEnsembleModel` with the additional capability to leverage base models.
  
  By specifying base models during init, stacker models can use the base model predictions as features during training and inference.
  
  This property allows for significantly improved model quality in many situations compared to non-stacking alternatives.
  
  Stacker models can act as base models to other stacker models, enabling multi-layer stack ensembling.
code: def _add_stack_to_feature_metadata(self):
      if len(self.models) == 0:
          type_map_raw = {
              column: R_FLOAT for column in self.stack_columns
          }
          type_group_map_special = {S_STACK: self.stack_columns}
          stacker_feature_metadata = FeatureMetadata(
              type_map_raw=type_map_raw,
              type_group_map_special=type_group_map_special,
          )
          if (
              self.feature_metadata is None
          ):  # TODO: This is probably not the best way to do this
              self.feature_metadata = stacker_feature_metadata
          else:
              # FIXME: This is a hack, stack feature special types should be already present in feature_metadata, not added here
              existing_stack_features = (
                  self.feature_metadata.get_features(
                      required_special_types=[S_STACK]
                  )
              )
              # HACK: Currently AutoGluon auto-adds all base learner prediction features into self.feature_metadata.
              # The two lines below are here because if feature pruning would crash if it prunes a base learner prediction feature.
              existing_features = self.feature_metadata.get_features()
              stacker_feature_metadata = (
                  stacker_feature_metadata.keep_features(
                      [
                          feature
                          for feature in existing_features
                          if feature in type_map_raw
                      ]
                  )
              )
              if set(stacker_feature_metadata.get_features()) != set(
                  existing_stack_features
              ):
                  self.feature_metadata = self.feature_metadata.add_special_types(
                      stacker_feature_metadata.get_type_map_special()
                  )
  
imports: import copy
  import logging
  import os
  import time
  from collections import defaultdict
  from typing import Dict
  import numpy
  import pandas
  from autogluon.common.features.feature_metadata import FeatureMetadata
  from autogluon.common.features.types import R_FLOAT, S_STACK
  from autogluon.common.utils.path_converter import PathConverter
  from ...constants import MULTICLASS, QUANTILE, SOFTCLASS
  from ..abstract.abstract_model import AbstractModel
  from .bagged_ensemble_model import BaggedEnsembleModel
label_desc: Use image node_id 14 for calling the StackerEnsembleModel obj's underlying member method code with example usage: obj._add_stack_to_feature_metadata() without return types