def extract_rate_limit(self, response):
        """Extract rate limit info from response/headers.
        get it just from the response, so it is relevant to the type of query we are doing"""
        try:
            self.rate_limit_remaining = int(response.headers['x-rate-limit-remaining'])
            self.rate_limit_limit = int(response.headers['x-rate-limit-limit'])
            self.rate_limit_reset = epoch(int(response.headers['x-rate-limit-reset'])).datetime
            self.twitter_date = parse(response.headers['date']).datetime
            logging.debug(
                'Twitter rate limit info:: rate-limit: %s, remaining: %s' % (self.rate_limit_limit, self.rate_limit_remaining))
            # logging.debug(
            #     'Twitter rate limit info:: rate-limit: %s, remaining: %s, '\
            #     'reset: %s, current-time: %s' % (self.rate_limit_limit,
            #     self.rate_limit_remaining, self.rate_limit_reset, self.twitter_date))
        except __HOLE__:
            pass
dataset/ETHPy150Open Impactstory/total-impact-webapp/totalimpactwebapp/twitter_paging.py/TwitterPager.extract_rate_limit