code: def _make_service_cluster(
      num_workers,
      local_shard_index,
      worker_addresses=None,
      deployment_mode=data_service_pb2.DEPLOYMENT_MODE_COLOCATED,
  ):
      if worker_addresses is None:
          worker_addresses = ["localhost" for _ in range(num_workers)]
  
      cluster = MultiProcessCluster(
          num_local_workers=0,
          num_remote_workers=0,
          worker_addresses=worker_addresses,
          deployment_mode=deployment_mode,
      )
      for _ in range(local_shard_index):
          cluster.start_remote_worker()
      cluster.start_local_worker()
      for _ in range(num_workers - local_shard_index - 1):
          cluster.start_remote_worker()
      return cluster
  
imports: from absl.testing import parameterized
  from tensorflow.core.protobuf import data_service_pb2
  from tensorflow.python.data.experimental.kernel_tests.service import multi_process_cluster
  from tensorflow.python.data.experimental.kernel_tests.service import test_base
  from tensorflow.python.data.experimental.kernel_tests.service.multi_process_cluster import MultiProcessCluster
  from tensorflow.python.data.experimental.ops import data_service_ops
  from tensorflow.python.data.experimental.ops import distribute
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.kernel_tests import tf_record_test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import readers
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
label_desc: Use image node_id 1 for calling a global function with example usage: _make_service_cluster(num_workers, local_shard_index, worker_addresses, deployment_mode) and returns: cluster