<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def killTask(self, driver, taskId):
 """ Kill parent task process and all its spawned children """

        try:
            pid = self.runningTasks[taskId]
            pgid = os.getpgid(pid)
        except KeyError:
            pass
        else:
            os.killpg(pgid, signal.SIGKILL)