util

General-purpose utilities that can be used for various purposes across the project.

Module Contents

util.batched(iterable, n, *, strict=False)[source]

Batch elements from the iterable into tuples of length n.

Taken from itertools in python 3.12: <https://docs.python.org/3/library/itertools.html#itertools.batched>

This function can be replaced with itertools.batched in the event of a python update.