def chunk(vs, size):
    """Chunk list `vs` into chunk of size `size`"""
    chunks = [vs[i : i + size] for i in range(0, len(vs), size)]
    if not chunks or len(chunks[-1]) != size:
        raise ValueError(f"list {vs} can not be chunked in {size}s")
    return chunks