def _batch(iterable, n=1) -> Iterable[Any]:
    """Return iterable batches of an iterable."""
    length = len(iterable)
    for ndx in range(0, length, n):
        yield iterable[ndx : min(ndx + n, length)]
Return iterable batches of an iterable.
llama-index-packs/llama-index-packs-diff-private-simple-dataset/llama_index/packs/diff_private_simple_dataset/base.py