code: def test_autotuner_resources(tmpdir, active_resources):
      config_dict = {
          "autotuning": {
              "enabled": True,
              "exps_dir": os.path.join(tmpdir, "exps_dir"),
              "arg_mappings": {},
          }
      }
      config_path = create_config_from_dict(tmpdir, config_dict)
      args = dsrun.parse_args(
          args=f"--autotuning {TUNE_OPTION} foo.py --deepspeed_config {config_path}".split()
      )
      tuner = Autotuner(args=args, active_resources=active_resources)
  
      expected_num_nodes = len(list(active_resources.keys()))
      assert expected_num_nodes == tuner.exp_num_nodes
  
      expected_num_gpus = min(
          [len(v) for v in active_resources.values()]
      )
      assert expected_num_gpus == tuner.exp_num_gpus
  
file_path: DeepSpeed/tests/unit/autotuning/test_autotuning.py
imports: import os
  import pytest
  from unit.simple_model import create_config_from_dict
  from deepspeed.launcher import runner
  from deepspeed.autotuning.autotuner import Autotuner
  from deepspeed.autotuning.scheduler import ResourceManager
label_desc: Use image node_id 3 for calling a global function with example usage: test_autotuner_resources(tmpdir, active_resources) without return types