code: def test_cpu_calculator_no_bottleneck():
      num_cpus = 32
      num_jobs = 20
  
      calculator = ResourceCalculatorFactory.get_resource_calculator(
          calculator_type="cpu"
      )
      assert type(calculator) == CpuResourceCalculator
  
      resources_info = calculator.get_resources_per_job(
          total_num_cpus=num_cpus,
          num_jobs=num_jobs,
          minimum_cpu_per_job=4,  # allows 8 jobs to run in parallel
      )
  
      expected_resources_per_trial = dict(
          cpu=4,
      )
      expected_num_parallel_jobs = 8
      expected_batches = 3
  
      assert (
          expected_resources_per_trial
          == resources_info["resources_per_job"]
      )
      assert (
          expected_num_parallel_jobs
          == resources_info["num_parallel_jobs"]
      )
      assert expected_batches == resources_info["batches"]
  
file_path: autogluon/core/tests/unittests/ray/test_resource_calculator.py
imports: import pytest
  from autogluon.common.utils.resource_utils import ResourceManager
  from autogluon.core.ray.resources_calculator import CpuResourceCalculator, GpuResourceCalculator, NonParallelGpuResourceCalculator, ResourceCalculatorFactory
label_desc: Use image node_id 1 for calling a global function with example usage: test_cpu_calculator_no_bottleneck() without return types