code: def _handle_offset_error(self, failure):
          
          # outstanding request got errback'd, clear it
          self._request_d = None
  
          if self._stopping and failure.check(CancelledError):
              # Not really an error
              return
          # Do we need to abort?
          if (self.request_retry_max_attempts != 0 and
                  self._fetch_attempt_count >= self.request_retry_max_attempts):
              log.debug(
                  "%r: Exhausted attempts: %d fetching offset from kafka: %r",
                  self, self.request_retry_max_attempts, failure)
              self._start_d.errback(failure)
              return
          # Decide how to log this failure... If we have retried so many times
          # we're at the retry_max_delay, then we log at warning every other time
          # debug otherwise
          if (self.retry_delay < self.retry_max_delay or
                  0 == (self._fetch_attempt_count % 2)):
              log.debug("%r: Failure fetching offset from kafka: %r", self,
                        failure)
          else:
              # We've retried until we hit the max delay, log at warn
              log.warning("%r: Still failing fetching offset from kafka: %r",
                          self, failure)
          self._retry_fetch()
docs: Retry the offset fetch request if appropriate.
  
          Once the :attr:`.retry_delay` reaches our :attr:`.retry_max_delay`, we
          log a warning.  This should perhaps be extended to abort sooner on
          certain errors.