code: def main(
      dispatchers: int,
      dispatcher_side: str,
      configfile: str,
      timeout: int,
  ):
      hvd.init()
      rank, size = hvd.rank(), hvd.size()
  
      if size % dispatchers:
          raise ValueError(
              f"Number of processes ({size}) must be a multiple of number of dispatchers ({dispatchers})."
          )
      workers_per_dispatcher = size // dispatchers
  
      # start the compute service on rank 0
      compute = None
      try:
          compute_config = None
  
          if rank == 0:
              key = secret.make_secret_key()
              compute = ComputeService(
                  dispatchers, workers_per_dispatcher, key=key
              )
  
              compute_config = TfDataServiceConfig(
                  dispatchers=dispatchers,
                  workers_per_dispatcher=workers_per_dispatcher,
                  dispatcher_side=dispatcher_side,
                  addresses=compute.addresses(),
                  key=key,
                  timeout=timeout,
              )
              compute_config.write(configfile)
  
          # broadcast this config to all ranks via CPU ops
          with tf.device(f"/cpu:0"):
              compute_config = hvd.broadcast_object(
                  compute_config, name="TfDataServiceConfig"
              )
  
          # start all compute workers
          compute_worker_fn(compute_config)
      finally:
          if compute is not None:
              compute.shutdown()
  
imports: import argparse
  import tensorflow
  import horovod.tensorflow
  from horovod.runner.common.service.compute_service import ComputeService
  from horovod.runner.common.util import secret
  from horovod.tensorflow.data.compute_service import TfDataServiceConfig, compute_worker_fn
label_desc: Use image node_id 1 for calling a global function with example usage: main(dispatchers, dispatcher_side, configfile, timeout) without return types