code: def get_env(envs_map):
      envs = []
      # get system envs
      keys = ["OMP_NUM_THREADS", "KMP_AFFINITY"]
      for k in keys:
          v = os.getenv(k)
          if v is not None:
              envs.append("export " + k + "=" + v + ";")
      # get ass_envs
      for k, v in envs_map.items():
          envs.append("export " + str(k) + "=" + str(v) + ";")
      return " ".join(envs)
  
file_path: byteps/launcher/dist_launcher.py
imports: import argparse
  import os, sys
  import signal
  import logging
  import subprocess
  from multiprocessing import Pool, Process
  from threading import Thread
label_desc: Use image node_id 2 for calling a global function with example usage: get_env(envs_map) and returns: str