code: def __init__(self, server):
      self.server = server
      server_def = server.server_def
      self.cluster = tf.train.ClusterSpec(server_def.cluster)
      self.task_index = server_def.task_index
  
      self.num_ps = self.cluster.num_tasks("ps")
      self.num_worker = self.cluster.num_tasks("worker")
  
imports: import re
  import tensorflow
  from ..tfutils.common import get_global_step_var, get_op_tensor_name
  from ..utils import logger
  from ..utils.argtools import memoized
  from .training import DataParallelBuilder, GraphBuilder
  from .utils import OverrideCachingDevice, split_grad_list, allreduce_grads_naive, override_to_local_variable
label_desc: Use image node_id 1 to create a new DistributedBuilderBase object from inherited base classes: GraphBuilder with example: obj = DistributedBuilderBase(server)