def call_api(resource, data=None, base_url=BASE_URL):
    try:
        payload = None if data is None else urlencode(data)
        if 3 >= py_version and payload is not None:
            payload = payload.encode('UTF-8')
        response = urlopen(base_url + resource, payload, timeout=TIMEOUT).read()
        return handle_response(response)
            
    except HTTPError as e:
        raise APIException(handle_response(e.read()), e.code)
dataset/ETHPy150Open blockchain/api-v1-client-python/blockchain/util.py/call_api/swapped operands of `>=`