code: def _split_cluster_for_evaluator(cluster_spec, task_type):
      """Split the cluster for evaluator since it needn't talk to other tasks."""
      # Splitting the cluster is important to prevent the evaluator from talking to
      # other tasks in the cluster. Since we allow evaluator not to use
      # distribution strategies and as a result ops in the evaluator task may have
      # unspecified devices. Those ops may end up on other tasks if we don't split
      # the cluster.
      # Note: if you bypass distribute coordinator and bring the cluster yourself,
      # you can equivalently set device filters to split clusters. This is already
      # done by distribution strategy's `update_config_proto` method.
      new_cluster_spec = multi_worker_util.normalize_cluster_spec(
          cluster_spec
      ).as_dict()
      if task_type == _TaskType.EVALUATOR:
          assert _TaskType.EVALUATOR in new_cluster_spec
          new_cluster_spec = {
              _TaskType.EVALUATOR: new_cluster_spec[_TaskType.EVALUATOR]
          }
      else:
          new_cluster_spec.pop(_TaskType.EVALUATOR, None)
      return multi_worker_util.normalize_cluster_spec(new_cluster_spec)
  
imports: import copy
  import json
  import os
  import threading
  import time
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.distribute import distribute_coordinator_context
  from tensorflow.python.distribute import multi_worker_util
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.training import coordinator
  from tensorflow.python.training import monitored_session
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 3 for calling a global function with example usage: _split_cluster_for_evaluator(cluster_spec, task_type) and returns: multi_worker_util