code: def testMultiTaskPerNodeRetrieval(self):
      slurm_cluster_resolver = SlurmClusterResolver(
          jobs={"ps": 1, "worker": 4},
          port_base=8888,
          gpus_per_node=2,
          gpus_per_task=1,
          auto_set_gpu=True,
      )
  
      actual_cluster_spec = slurm_cluster_resolver.cluster_spec()
      expected_proto = """
      job { name: 'ps' tasks { value: 't02n13:8888' } }
      job { name: 'worker' tasks { key: 0 value: 't02n13:8889' }
                           tasks { key: 1 value: 't02n41:8888' }
                           tasks { key: 2 value: 't02n41:8889' }
                           tasks { key: 3 value: 't02n43:8888' } }
      """
  
      self._verifyClusterSpecEquality(
          actual_cluster_spec, expected_proto
      )
      assert os.environ["CUDA_VISIBLE_DEVICES"] == "1"
  
file_path: tensorflow-upstream/tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver_test.py
imports: import os
  from tensorflow.python.distribute.cluster_resolver.slurm_cluster_resolver import expand_hostlist
  from tensorflow.python.distribute.cluster_resolver.slurm_cluster_resolver import expand_tasks_per_node
  from tensorflow.python.distribute.cluster_resolver.slurm_cluster_resolver import SlurmClusterResolver
  from tensorflow.python.platform import test
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 8 for calling the SlurmClusterResolverTest obj's underlying member method code with example usage: obj.testMultiTaskPerNodeRetrieval() without return types