def make_request(self, url, method, data=None, sleep_if_throttled=True):
        while True:
            if data:
                response = requests.request(
                    method,
                    url,
                    data=json.dumps(data),
                    headers={
                        'Authorization': 'Token ' + self.token,
                        'Content-Type': 'application/json'
                    }
                )
            else:
                response = requests.request(
                    method,
                    url,
                    headers={
                        'Authorization': 'Token ' + self.token,
                        'Content-Type': 'application/json'
                    }
                )

            response_json = response.json()
            if sleep_if_throttled and response.status_code == 429 and response_json['detail'] in 'seconds':
                seconds = re.findall(r'available in (\d+) seconds', response_json['detail'])[0]
                time.sleep(int(seconds))
                continue
            elif (sleep_if_throttled and response.status_code == 429 and
                    'Too many concurrent requests' in response_json['detail']):
                time.sleep(2)
                continue
            return response
dataset/ETHPy150Open monkeylearn/monkeylearn-python/monkeylearn/utils.py/SleepRequestsMixin.make_request/swapped operands of `in`