code: def start_server(cluster_resolver, protocol):
      """Start a server and block the process from exiting."""
      # This function is for multi-processing test or users who would like to have
      # every job run the same binary for simplicity.
      if not (
          cluster_resolver.task_type == "worker"
          or cluster_resolver.task_type == "ps"
      ):
          raise ValueError(
              "Unexpected task_type to start a server: {}".format(
                  cluster_resolver.task_type
              )
          )
  
      server = server_lib.Server(
          cluster_resolver.cluster_spec().as_cluster_def(),
          job_name=cluster_resolver.task_type,
          task_index=cluster_resolver.task_id,
          protocol=protocol,
      )
  
      logging.info(
          "TensorFlow server started for job %s, task %d.",
          cluster_resolver.task_type,
          cluster_resolver.task_id,
      )
  
      # Blocking the process that starts a server from exiting.
      server.join()
  
file_path: tensorflow/tensorflow/python/distribute/coordinator/utils.py
imports: import threading
  import time
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 1 for calling a global function with example usage: start_server(cluster_resolver, protocol) without return types