code: def setUp(self):
      super().setUp()
  
      self._cluster = (
          multi_worker_test_base.create_multi_process_cluster(
              num_workers=1,
              num_ps=1,
              rpc_layer=self.get_rpc_layer(),
              stream_output=True,
          )
      )
      self._cluster_def = (
          self._cluster.cluster_resolver.cluster_spec().as_dict()
      )
      self._cluster_def["chief"] = [
          "localhost:%d" % multi_worker_test_base.pick_unused_port()
      ]
      cluster_resolver = cluster_resolver_lib.SimpleClusterResolver(
          ClusterSpec(self._cluster_def), rpc_layer=self.get_rpc_layer()
      )
      self.strategy = (
          parameter_server_strategy_v2.ParameterServerStrategyV2(
              cluster_resolver
          )
      )
      self.coordinator = coordinator_lib.ClusterCoordinator(
          self.strategy
      )
  
      self.thread_coord = thread_coordinator.Coordinator(
          clean_stop_exception_types=[]
      )
      metric_utils._init()
  
imports: import time
  from tensorflow.python.distribute import multi_process_runner
  from tensorflow.python.distribute import multi_worker_test_base
  from tensorflow.python.distribute import parameter_server_strategy_v2
  from tensorflow.python.distribute.cluster_resolver import cluster_resolver
  from tensorflow.python.distribute.coordinator import cluster_coordinator
  from tensorflow.python.distribute.coordinator import metric_utils
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.training import coordinator
  from tensorflow.python.training.server_lib import ClusterSpec
label_desc: Use image node_id 2 for calling the MetricUtilsTest obj's underlying member method code with example usage: obj.setUp() without return types