def METHOD_NAME(self, timeout=5):
    self._logger.info("Waiting for output. Timeout: %s" % timeout)
    events = self._poller.poll(timeout * 1000)
    if not events:
        self._logger.debug("Process generated no output")
        self._pending = 0
        return None
    else:
        self._pending = len(self._proc.stdout.peek())
        self._logger.debug("Process generated %s" % self._pending)
        return self._pending