code: def _as_process(self):
      
      if self._process is None and self.pid:
        self._process = psutil.Process(self.pid)
      return self._process
docs: Returns a psutil `Process` object wrapping our pid.
  
      NB: Even with a process object in hand, subsequent method calls against it can always raise
      `NoSuchProcess`.  Care is needed to document the raises in the public API or else trap them and
      do something sensible for the API.
  
      :returns: a psutil Process object or else None if we have no pid.
      :rtype: :class:`psutil.Process`
      :raises: :class:`psutil.NoSuchProcess` if the process identified by our pid has died.