def kill_process(proc):
 p1_group = psutil.Process(proc.pid)
 child_pids = p1_group.get_children(recursive=True)
 for child_pid in child_pids:
  os.kill(child_pid.pid, signal.SIGKILL)

def kill_process ( proc ) : p1_group = psutil . Process ( proc . pid ) child_pids = p1_group . get_children ( recursive = True ) for child_pid in child_pids : os . kill ( child_pid . pid , signal . SIGKILL )
kill the process with the given pid using the given signal .