@contextmanager
def max_3pc_batch_limits(tconf, size, wait=10000):
    old_size = tconf.Max3PCBatchSize
    old_wait = tconf.Max3PCBatchWait
    tconf.Max3PCBatchSize = size
    tconf.Max3PCBatchWait = wait
    (yield tconf)
    tconf.Max3PCBatchSize = old_size
    tconf.Max3PCBatchWait = old_wait
@contextmanager
def max_3pc_batch_limits(tconf, size, wait=10000):
    old_size = tconf.Max3PCBatchSize
    old_wait = tconf.Max3PCBatchWait
    tconf.Max3PCBatchSize = size
    tconf.Max3PCBatchWait = wait
    (yield tconf)
    tconf.Max3PCBatchSize = old_size
    tconf.Max3PCBatchWait = old_wait