def METHOD_NAME(self, response):
    remaining = int(response.getheader("X-RateLimit-Remaining", 0))
    reset_in = int(response.getheader("X-RateLimit-Reset-In", 0))
    self.logger.debug("X-RateLimit-Remaining: %i", remaining)
    self.logger.debug("X-RateLimit-Reset-In: %i", reset_in)
    if remaining == 0:
        self.__next_request_time = time.time() + reset_in