code: def test_gpu_cpu_num():
      d1 = ResourceSpec(resource_file=resource_specs[0])
      s1 = d1.num_gpus
      assert s1 == 2
      d2 = ResourceSpec(resource_file=resource_specs[1])
      s2 = d2.num_cpus
      assert s2 == 2
  
imports: from autodist.resource_spec import DeviceSpec, DeviceType
  import os
  from autodist.resource_spec import DeviceSpec, DeviceType, ResourceSpec
label_desc: Use image node_id 2 for calling a global function with example usage: test_gpu_cpu_num() without return types