in core/util.py [0:0]
def batched(iterable, chunk_size): iterator = iter(iterable) while chunk := list(islice(iterator, chunk_size)): yield chunk