code: def _handle_offset_response(self, response):
          
          # Got a response, clear our outstanding request deferred
          self._request_d = None
  
          # Successful request, reset our retry delay, count, etc
          self.retry_delay = self.retry_init_delay
          self._fetch_attempt_count = 1
  
          response = response[0]
          if hasattr(response, 'offsets'):
              # It's a response to an OffsetRequest
              self._fetch_offset = response.offsets[0]
          else:
              # It's a response to an OffsetFetchRequest
              # Make sure we got a valid offset back. Kafka uses -1 to indicate
              # no committed offset was retrieved
              if response.offset == OFFSET_NOT_COMMITTED:
                  self._fetch_offset = OFFSET_EARLIEST
              else:
                  self._fetch_offset = response.offset + 1
                  self._last_committed_offset = response.offset
          self._do_fetch()
docs: Handle responses to both OffsetRequest and OffsetFetchRequest, since
          they are similar enough.
  
          :param response:
              A tuple of a single OffsetFetchResponse or OffsetResponse