code: def check_for_done(process_queue):
      """Checks for finished process ids
  
      Args:
          process_queue: list of process ids
      Returns:
          (True, process_idx) if there is any finished process
          (False, False) if there is not finished processes
      """
  
      for i, pid in enumerate(process_queue):
          zombie = False
          try:
              p = psutil.Process(pid)
              zombie = p.status() == "zombie"
          except psutil.NoSuchProcess:
              pass
          if not psutil.pid_exists(pid) or zombie:
              return True, i
  
      return False, False
  
imports: import os
  import argparse
  import logging
  import sys
  import time
  import psutil
label_desc: Use image node_id 1 for calling a global function with example usage: check_for_done(process_queue) and returns: False,  False, True,  i