docstr: Number of stacking levels to use in stack ensemble. Roughly increases model training time by factor of `num_stack_levels+1` (set = 0 to disable stack ensembling).
  Disabled by default (0), but we recommend values between 1-3 to maximize predictive performance.
  To prevent overfitting, `num_bag_folds >= 2` must also be set or else a ValueError will be raised.
docstr_tok: ["Number","of","stacking","levels","to","use","in","stack","ensemble",".","Roughly","increases","model","training","time","by","factor","of","`","num_stack_levels+1","`","(","set","=","0","to","disable","stack","ensembling",")",".","Disabled","by","default","(","0",")",",","but","we","recommend","values","between","1-3","to","maximize","predictive","performance",".","To","prevent","overfitting",",","`","num_bag_folds",">","=","2","`","must","also","be","set","or","else","a","ValueError","will","be","raised","."]
code: def num_stack_levels(self, num_stack_levels: int) -> ConfigBuilder:
      """
      Number of stacking levels to use in stack ensemble. Roughly increases model training time by factor of `num_stack_levels+1` (set = 0 to disable stack ensembling).
      Disabled by default (0), but we recommend values between 1-3 to maximize predictive performance.
      To prevent overfitting, `num_bag_folds >= 2` must also be set or else a ValueError will be raised.
      """
      assert (
          num_stack_levels >= 0
      ), "num_stack_levels must be greater or equal than zero"
      self.config["num_stack_levels"] = num_stack_levels
      return self
  
imports: from __future__ import annotations
  import copy
  from typing import Union
  from sklearn.base import BaseEstimator
  from autogluon.core.scheduler import scheduler_factory
  from autogluon.features import AutoMLPipelineFeatureGenerator
  from autogluon.tabular.configs.hyperparameter_configs import hyperparameter_config_dict
  from autogluon.tabular.configs.presets_configs import tabular_presets_dict
  from autogluon.tabular.trainer.model_presets.presets import MODEL_TYPES
label_desc: Use image node_id 8 for calling the ConfigBuilder obj's underlying member method code with example usage: obj.num_stack_levels(num_stack_levels) and returns: self