docstr: Number of folds used for bagging of models. When `num_bag_folds = k`, training time is roughly increased by a factor of `k` (set = 0 to disable bagging).
  Disabled by default (0), but we recommend values between 5-10 to maximize predictive performance.
  Increasing num_bag_folds will result in models with lower bias but that are more prone to overfitting.
  `num_bag_folds = 1` is an invalid value, and will raise a ValueError.
  Values > 10 may produce diminishing returns, and can even harm overall results due to overfitting.
  To further improve predictions, avoid increasing `num_bag_folds` much beyond 10 and instead increase `num_bag_sets`.
docstr_tok: ["Number","of","folds","used","for","bagging","of","models",".","When","`","num_bag_folds","=","k","`",",","training","time","is","roughly","increased","by","a","factor","of","`","k","`","(","set","=","0","to","disable","bagging",")",".","Disabled","by","default","(","0",")",",","but","we","recommend","values","between","5-10","to","maximize","predictive","performance",".","Increasing","num_bag_folds","will","result","in","models","with","lower","bias","but","that","are","more","prone","to","overfitting",".","`","num_bag_folds","=","1","`","is","an","invalid","value",",","and","will","raise","a","ValueError",".","Values",">","10","may","produce","diminishing","returns",",","and","can","even","harm","overall","results","due","to","overfitting",".","To","further","improve","predictions",",","avoid","increasing","`","num_bag_folds","`","much","beyond","10","and","instead","increase","`","num_bag_sets","`","."]
code: def num_bag_folds(self, num_bag_folds: int) -> ConfigBuilder:
      """
      Number of folds used for bagging of models. When `num_bag_folds = k`, training time is roughly increased by a factor of `k` (set = 0 to disable bagging).
      Disabled by default (0), but we recommend values between 5-10 to maximize predictive performance.
      Increasing num_bag_folds will result in models with lower bias but that are more prone to overfitting.
      `num_bag_folds = 1` is an invalid value, and will raise a ValueError.
      Values > 10 may produce diminishing returns, and can even harm overall results due to overfitting.
      To further improve predictions, avoid increasing `num_bag_folds` much beyond 10 and instead increase `num_bag_sets`.
      """
      assert (
          num_bag_folds >= 0
      ), "num_bag_folds must be greater or equal than zero"
      self.config["num_bag_folds"] = num_bag_folds
      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 6 for calling the ConfigBuilder obj's underlying member method code with example usage: obj.num_bag_folds(num_bag_folds) and returns: self