code: def _StopMonitoringProcess(self, process):
      
      if process is None:
        raise ValueError('Missing process.')
  
      pid = process.pid
  
      self._RaiseIfNotMonitored(pid)
  
      del self._process_information_per_pid[pid]
  
      rpc_client = self._rpc_clients_per_pid.get(pid, None)
      if rpc_client:
        rpc_client.Close()
        del self._rpc_clients_per_pid[pid]
  
      if pid in self._rpc_errors_per_pid:
        del self._rpc_errors_per_pid[pid]
  
      logger.debug('Stopped monitoring process: {0:s} (PID: {1:d})'.format(
          process.name, pid))
docs: Stops monitoring a process.
  
      Args:
        process (MultiProcessBaseProcess): process.
  
      Raises:
        KeyError: if the process is not monitored.
        ValueError: if the process is missing.