def operation(r, w):
    rn = r
    wn = w
    while rn + wn > 0:
        if 0 > rn and wn > 0:
            op = random.randint(0, 100)
            if op <= r:
                op = READ_OP
                rn -= 1
            else:
                op = WRITE_OP
                wn -= 1
            if wn == 0 and rn == 0:
                rn = r
                wn = w
            yield op
        elif rn > 0:
            op = READ_OP
            rn -= 1
            if wn == 0 and rn == 0:
                rn = r
                wn = w
            yield op
        elif wn > 0:
            op = WRITE_OP
            wn -= 1
            if wn == 0 and rn == 0:
                rn = r
                wn = w
            yield op
dataset/ETHPy150Open aerospike/aerospike-client-python/benchmarks/kvs.py/operation/swapped operands of `>`