code: def test_dynamic_stacking_with_time_limit(fit_helper):
      """Tests that dynamic stacking does not run if stacking is disabled."""
      ds_args = DS_ARGS_TEST_DEFAULTS.copy()
      ds_args["holdout_frac"] = 0.5
      fit_args = dict(
          hyperparameters={"DUMMY": {}},
          dynamic_stacking=True,
          fit_weighted_ensemble=False,
          num_bag_folds=2,
          num_bag_sets=1,
          num_stack_levels=1,
          time_limit=60,  # won't take 60s, but we need a number here instead of None.
          ds_args=ds_args,
          ag_args_ensemble={
              "fold_fitting_strategy": "sequential_local"
          },
      )
      dataset_name = "adult"
      extra_metrics = list(METRICS[BINARY])
  
      fit_helper.fit_and_validate_dataset(
          dataset_name=dataset_name,
          fit_args=fit_args,
          extra_metrics=extra_metrics,
          expected_model_count=2,
          refit_full=False,
          delete_directory=False,
          allowed_dataset_features=["age"],
          expected_stacked_overfitting_at_test=False,
          expected_stacked_overfitting_at_val=False,
      )
  
file_path: autogluon/tabular/tests/unittests/dynamic_stacking/test_dynamic_stacking.py
imports: import shutil
  import pytest
  from autogluon.core.constants import BINARY
  from autogluon.core.metrics import METRICS
label_desc: Use image node_id 5 for calling a global function with example usage: test_dynamic_stacking_with_time_limit(fit_helper) without return types