def _TerminateProcessByPid(self, pid):
    """Terminate a process that's monitored by the engine.

    Args:
      pid (int): process identifier (PID).

    Raises:
      KeyError: if the process is not registered with and monitored by the
          engine.
    """
    self._RaiseIfNotRegistered(pid)

    process = self._processes_per_pid[pid]

    self._TerminateProcess(process)
    self._StopMonitoringProcess(process)
def _TerminateProcessByPid ( self , pid ) : self . _RaiseIfNotRegistered ( pid ) process = self . _processes_per_pid [ pid ] self . _TerminateProcess ( process ) self . _StopMonitoringProcess ( process )
Terminate a process that's monitored by the engine.

    Args:
      pid (int): process identifier (PID).

    Raises:
      KeyError: if the process is not registered with and monitored by the
          engine.