def i_batch(items, size):
    for items_batch in iter(lambda: tuple(islice(items, size)),
                            tuple()):
        yield items_batch
Generator that iteratively batches items to a max size and consumes the
dataset/ETHPy150Open Workiva/furious/furious/extras/appengine/ndb_persistence.py/i_batch