code: def get_killed_pids(ip, port, killed_pids):
      """Get the process IDs that we want to kill but are still alive."""
      killed_pids = [str(pid) for pid in killed_pids]
      killed_pids = ",".join(killed_pids)
      ps_cmd = (
          "ssh -o StrictHostKeyChecking=no -p "
          + str(port)
          + " "
          + ip
          + " 'ps -p {} -h'".format(killed_pids)
      )
      res = subprocess.run(ps_cmd, shell=True, stdout=subprocess.PIPE)
      pids = []
      for p in res.stdout.decode("utf-8").split("\n"):
          l = p.split()
          if len(l) > 0:
              pids.append(int(l[0]))
      return pids
  
imports: import argparse
  import json
  import logging
  import multiprocessing
  import os
  import queue
  import re
  import signal
  import subprocess
  import sys
  import time
  from functools import partial
  from threading import Thread
  from typing import Optional
label_desc: Use image node_id 3 for calling a global function with example usage: get_killed_pids(ip, port, killed_pids) and returns: pids