import itertools


def chunked(iterable, size):
    """Split iterable `iter` into one or more `size` sized tuples"""
    it = iter(iterable)
    return iter(lambda: tuple(itertools.islice(it, size)), ())