code: def worker(local_rank, local_size, command, allocation=None):
      my_env = os.environ.copy()
      my_env["BYTEPS_LOCAL_RANK"] = str(local_rank)
      my_env["BYTEPS_LOCAL_SIZE"] = str(local_size)
      if int(os.getenv("BYTEPS_ENABLE_GDB", 0)):
          if command.find("python") != 0:
              command = "python " + command
          command = "gdb -ex 'run' -ex 'bt' -batch --args " + command
  
      if allocation:
          print("enable NUMA finetune...")
          retval = subprocess.call(
              ["dpkg", "-s", "numactl"],
              stdout=subprocess.DEVNULL,
              stderr=subprocess.STDOUT,
          )
          if retval == 0:
              numa = "numactl --physcpubind "
              for cpu_set in allocation:
                  if len(cpu_set) == 1:
                      numa += "{},".format(cpu_set[0])
                  else:
                      numa += "{}-{},".format(cpu_set[0], cpu_set[-1])
              numa = numa.strip(",") + " "
              command = numa + command
              print("Command: %s\n" % command)
          else:
              print(
                  "Warning: numactl not found. try `sudo apt-get install numactl`."
              )
  
      if os.environ.get("BYTEPS_TRACE_ON", "") == "1":
          print(
              "\n!!!Enable profiling for WORKER_ID: %s and local_rank: %d!!!"
              % (os.environ.get("DMLC_WORKER_ID"), local_rank)
          )
          print(
              "BYTEPS_TRACE_START_STEP: %s\tBYTEPS_TRACE_END_STEP: %s\t BYTEPS_TRACE_DIR: %s"
              % (
                  os.environ.get("BYTEPS_TRACE_START_STEP", ""),
                  os.environ.get("BYTEPS_TRACE_END_STEP", ""),
                  os.environ.get("BYTEPS_TRACE_DIR", ""),
              )
          )
          print("Command: %s\n" % command)
          sys.stdout.flush()
          trace_path = os.path.join(
              os.environ.get("BYTEPS_TRACE_DIR", "."), str(local_rank)
          )
          if not os.path.exists(trace_path):
              os.makedirs(trace_path)
      subprocess.check_call(
          command,
          env=my_env,
          stdout=sys.stdout,
          stderr=sys.stderr,
          shell=True,
      )
  
file_path: byteps/launcher/launch.py
imports: from __future__ import print_function
  import os
  import re
  import subprocess
  import threading
  import sys
  import time
  from functools import reduce
label_desc: Use image node_id 3 for calling a global function with example usage: worker(local_rank, local_size, command, allocation) without return types