code: def test_parallel_bagging_resources_per_fold():
      fold_fitting_strategy = _construct_dummy_fold_strategy(
          fold_strategy_cls=ParallelLocalFoldFittingStrategy,
          num_jobs=8,
          num_folds_parallel=8,
          bagged_resources={"num_cpus": 8, "num_gpus": 1},
          model_base_resources={"num_cpus": 4, "num_gpus": 1},
          model_base_minimum_resources={"num_cpus": 1, "num_gpus": 0.1},
          model_base_default_resources={"num_cpus": 8, "num_gpus": 1},
      )
      assert fold_fitting_strategy.resources == {
          "num_cpus": 4,
          "num_gpus": 1,
      }
      assert fold_fitting_strategy.resources_model == {
          "num_cpus": 4,
          "num_gpus": 1,
      }
      assert fold_fitting_strategy.num_parallel_jobs == 1
      assert fold_fitting_strategy.batches == 8
  
      fold_fitting_strategy = _construct_dummy_fold_strategy(
          fold_strategy_cls=ParallelLocalFoldFittingStrategy,
          num_jobs=8,
          num_folds_parallel=8,
          bagged_resources={"num_cpus": 8, "num_gpus": 1},
          model_base_resources={"num_cpus": 1, "num_gpus": 0.1},
          model_base_minimum_resources={"num_cpus": 1, "num_gpus": 0.1},
          model_base_default_resources={"num_cpus": 8, "num_gpus": 1},
      )
      assert fold_fitting_strategy.resources == {
          "num_cpus": 1,
          "num_gpus": 0.1,
      }
      assert fold_fitting_strategy.resources_model == {
          "num_cpus": 1,
          "num_gpus": 0.1,
      }
      assert fold_fitting_strategy.num_parallel_jobs == 8
      assert fold_fitting_strategy.batches == 1
  
imports: import time
  import numpy
  import pandas
  import pytest
  from autogluon.core.models.ensemble.bagged_ensemble_model import BaggedEnsembleModel
  from autogluon.core.models.ensemble.fold_fitting_strategy import ParallelLocalFoldFittingStrategy, SequentialLocalFoldFittingStrategy
  from autogluon.tabular.models import AbstractModel
label_desc: Use image node_id 4 for calling a global function with example usage: test_parallel_bagging_resources_per_fold() without return types