code: def test_bagged_model_with_total_resources_but_no_gpu_specified(
      mock_system_resources_ctx_mgr,
      mock_num_cpus,
      mock_num_gpus,
      k_fold,
  ):
      with mock_system_resources_ctx_mgr(
          num_cpus=mock_num_cpus, num_gpus=mock_num_gpus
      ):
          model_base = DummyModel()
          model_base.initialize()
          total_resources = {
              "num_cpus": 2,
          }
          bagged_model = DummyBaggedModel(model_base)
          bagged_model.initialize()
          resources = bagged_model._preprocess_fit_resources(
              total_resources=total_resources, k_fold=k_fold
          )
          resources.pop("k_fold")
          default_model_resources = {
              "num_cpus": 2,
              "num_gpus": ResourceManager.get_gpu_count(),
          }  # return all gpu resources as default needs gpu
          assert resources == default_model_resources
  
imports: import pytest
  from autogluon.common.utils.resource_utils import ResourceManager
  from autogluon.core.models.ensemble.bagged_ensemble_model import BaggedEnsembleModel
  from autogluon.tabular.models import AbstractModel
label_desc: Use image node_id 3 for calling a global function with example usage: test_bagged_model_with_total_resources_but_no_gpu_specified(mock_system_resources_ctx_mgr, mock_num_cpus, mock_num_gpus, k_fold) without return types