docstr: Kills `job` (index: 0) and restarts it after `downtime_secs`.
  
  Args:
    downtime_secs: secs before restarting the job.
    job: a string specifying the job to restart.
docstr_tok: ["Kills","`","job","`","(","index",":","0",")","and","restarts","it","after","`","downtime_secs","`",".","Args",":","downtime_secs",":","secs","before","restarting","the","job",".","job",":","a","string","specifying","the","job","to","restart","."]
code: def _restart(self, downtime_secs, job):
      """Kills `job` (index: 0) and restarts it after `downtime_secs`.
  
      Args:
        downtime_secs: secs before restarting the job.
        job: a string specifying the job to restart.
      """
      self._cluster.kill_task(job, 0)
      time.sleep(downtime_secs)
      self.assertFalse(
          context.check_alive("/job:%s/replica:0/task:0" % job)
      )
      self._cluster.start_task(job, 0)
      while not context.check_alive("/job:%s/replica:0/task:0" % job):
          time.sleep(1)
  
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 4 for calling the MetricUtilsTest obj's underlying member method code with example usage: obj._restart(downtime_secs, job) without return types