code: def start_new_process_group(cmd):
      # Otherwise cmd will be killed after this process is killed
      # To mock the behavior of nni experiment launch
      if sys.platform == "win32":
          return subprocess.Popen(
              cmd, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP
          )
      else:
          return subprocess.Popen(cmd, preexec_fn=os.setpgrp)
  
file_path: nni/test/ut/tools/nnictl/test_kill_command.py
imports: import argparse
  import multiprocessing
  import os
  import subprocess
  import signal
  import sys
  import signal
  import time
  import pytest
  from nni.tools.nnictl.command_utils import kill_command, _check_pid_running
label_desc: Use image node_id 8 for calling a global function with example usage: start_new_process_group(cmd) and returns: subprocess, subprocess