docs: def _monitor_task(self):
          """Wrapper that handles the actual asynchronous monitoring of the task
          state.
  
          """
          if self.task.state in states.UNREADY_STATES:
              reactor.callLater(self.POLL_PERIOD, self._monitor_task)
              return
  
          if self.task.state == 'SUCCESS':
              self.callback(self.task.result)
          elif self.task.state == 'FAILURE':
              self.errback(Failure(self.task.result))
          elif self.task.state == 'REVOKED':
              self.errback(
                  Failure(defer.CancelledError('Task {0}'.format(self.task.id))))
          else:
              self.errback(ValueError(
                  'Cannot respond to `{}` state'.format(self.task.state)
              ))