code: def kill_process(regex_pattern):
      """kill process whose execution commnad is matched by regex pattern
  
      Args:
          regex_pattern(string): regex pattern used to filter the process to be killed
  
      NOTE:
          In windows, we will replace sep `/` with `\\\\`
      """
      if _IS_WINDOWS:
          regex_pattern = regex_pattern.replace("/", "\\\\")
          command = r"""for /F "skip=2 tokens=2 delims=," %a in ('wmic process where "commandline like '%{}%'" get processid^,status /format:csv') do taskkill /F /T /pid %a""".format(
              regex_pattern
          )
          with os.popen(command) as p:
              p.read()
      else:
          command = "ps aux | grep {} | awk '{{print $2}}' | xargs kill -9".format(
              regex_pattern
          )
          subprocess.call([command], shell=True)
  
file_path: PARL/parl/utils/utils.py
imports: import os
  import subprocess
  import sys
  import multiprocessing
  import numpy
  from parl.utils import logger
label_desc: Use image node_id 7 for calling a global function with example usage: kill_process(regex_pattern) without return types