code: def launch_cmd(args, step_num, cmd):
      working_dir = step_dirs[step_num]
      print(f"Running:\n{cmd}")
      p = subprocess.Popen(cmd, cwd=working_dir, shell=True)
      p.wait()
      if p.returncode != 0:
          raise RuntimeError(
              "\n\n".join(
                  (
                      f"Step {step_num} exited with non-zero status {p.returncode}",
                      f"Launch command: {cmd}",
                      f"Log output: {os.path.join(get_output_dir(args, step_num), 'training.log')}",
                      f"Please see our tutorial at {dse_url}{step_dirs[step_num]}",
                      "Please check that you have installed our requirements: `pip install -r requirements.txt`",
                      f"If you are seeing an OOM error, try modifying {get_script(args, step_num)}:",
                      "  - Reduce `--per_device_*_batch_size`",
                      "  - Increase `--zero_stage {0,1,2,3}` on multi-gpu setups",
                      "  - Enable `--gradient_checkpointing` or `--only_optimize_lora`",
                  )
              )
          )
  
file_path: deepspeedexamples/applications/DeepSpeed-Chat/e2e_rlhf.py
imports: import argparse
  import warnings
  import subprocess
  import os
  import datetime
  import time
  import sys
label_desc: Use image node_id 8 for calling a global function with example usage: launch_cmd(args, step_num, cmd) without return types