code: def testWorkerId(self):
      cluster_spec = {
          "chief": ["127.0.0.1:1234"],
          "worker": ["127.0.0.1:8964", "127.0.0.1:2333"],
          "ps": ["127.0.0.1:1926", "127.0.0.1:3141"],
      }
      self.assertEqual(
          multi_worker_util.id_in_cluster(cluster_spec, "worker", 1), 2
      )
  
      cluster_spec = {
          "worker": ["127.0.0.1:8964", "127.0.0.1:2333"],
          "ps": ["127.0.0.1:1926", "127.0.0.1:3141"],
      }
      self.assertEqual(
          multi_worker_util.id_in_cluster(cluster_spec, "worker", 1), 1
      )
  
imports: from tensorflow.core.protobuf import cluster_pb2
  from tensorflow.python.distribute import multi_worker_util
  from tensorflow.python.eager import test
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 2 for calling the IdInClusterTest obj's underlying member method code with example usage: obj.testWorkerId() without return types