code: def killTask(self, driver, taskId):
          
          try:
              pid = self.runningTasks[taskId]
              pgid = os.getpgid(pid)
          except KeyError:
              pass
          else:
              os.killpg(pgid, signal.SIGKILL)
docs: Kill parent task process and all its spawned children