def sdk_send_batches_of_random(looper, txnPoolNodeSet, sdk_pool, sdk_wallet, num_reqs, num_batches=1, timeout=Max3PCBatchWait):
    if (num_reqs < num_batches):
        raise BaseException('sdk_send_batches_of_random_and_check method assumes that `num_reqs` <= num_batches*MaxbatchSize')
    if (num_batches == 1):
        sdk_reqs = sdk_send_random_requests(looper, sdk_pool, sdk_wallet, num_reqs)
        looper.runFor(timeout)
        return sdk_reqs
    reqs_in_batch = (num_reqs // num_batches)
    reqs_in_last_batch = (reqs_in_batch + (num_reqs % num_batches))
    sdk_reqs = []
    for _ in range((num_batches - 1)):
        sdk_reqs.extend(sdk_send_random_requests(looper, sdk_pool, sdk_wallet, reqs_in_batch))
        looper.runFor(timeout)
    sdk_reqs.extend(sdk_send_random_requests(looper, sdk_pool, sdk_wallet, reqs_in_last_batch))
    looper.runFor(timeout)
    return sdk_reqs
def sdk_send_batches_of_random(looper, txnPoolNodeSet, sdk_pool, sdk_wallet, num_reqs, num_batches=1, timeout=Max3PCBatchWait):
    if (num_reqs < num_batches):
        raise BaseException('sdk_send_batches_of_random_and_check method assumes that `num_reqs` <= num_batches*MaxbatchSize')
    if (num_batches == 1):
        sdk_reqs = sdk_send_random_requests(looper, sdk_pool, sdk_wallet, num_reqs)
        looper.runFor(timeout)
        return sdk_reqs
    reqs_in_batch = (num_reqs // num_batches)
    reqs_in_last_batch = (reqs_in_batch + (num_reqs % num_batches))
    sdk_reqs = []
    for _ in range((num_batches - 1)):
        sdk_reqs.extend(sdk_send_random_requests(looper, sdk_pool, sdk_wallet, reqs_in_batch))
        looper.runFor(timeout)
    sdk_reqs.extend(sdk_send_random_requests(looper, sdk_pool, sdk_wallet, reqs_in_last_batch))
    looper.runFor(timeout)
    return sdk_reqs