class_docstr: tf.data service cluster with dispatcher and workers as subprocesses.
  
  To run the cluster in co-located mode, set `num_workers` to 0 and create the
  tf.data service workers manually in each client process.
code: def stop(self):
      # Segfault logs may still be printed because clean exit of child processes
      # is not always possible. This will not affect the outcome of the test.
      logging.info("Will try to stop TFDataServiceCluster!")
  
      for idx in range(self._num_workers):
          address = self._worker_addresses[idx]
          pipe_to_worker = self._worker_pipes[idx]
          logging.info("Stopping worker %s...", address)
          pipe_to_worker.send("stop")
          if pipe_to_worker.poll(2):
              if pipe_to_worker.recv() == "stopped":
                  logging.info(
                      "Successfully stopped worker %s", address
                  )
          self._workers[idx].terminate()
  
      logging.info("Stopping dispatcher...")
      self._pipe_to_dispatcher.send("stop")
      if self._pipe_to_dispatcher.poll(2):
          if self._pipe_to_dispatcher.recv() == "stopped":
              logging.info("Successfully stopped dispatcher")
      self._dispatcher_process.terminate()
  
imports: import os
  from typing import Any, List, Mapping, Optional, Tuple
  from absl import logging
  from absl.testing import parameterized
  import numpy
  from tensorflow.core.example import example_pb2
  from tensorflow.core.example import feature_pb2
  from tensorflow.dtensor.python import accelerator_util
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python import input_util
  from tensorflow.dtensor.python import layout
  from tensorflow.dtensor.python import mesh_util
  from tensorflow.dtensor.python.tests import multi_client_test_util
  from tensorflow.dtensor.python.tests import test_backend_util
  from tensorflow.dtensor.python.tests import test_util
  from tensorflow.python.data.experimental.service import server_lib
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import readers
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import device_spec
  from tensorflow.python.framework import dtypes
  from tensorflow.python.lib.io import tf_record
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import gen_parsing_ops
  from tensorflow.python.ops import io_ops
  from tensorflow.python.ops import parsing_config
  from tensorflow.python.ops import parsing_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the TFDataServiceCluster obj's underlying member method code with example usage: obj.stop() without return types