def make_blocks(listlike, blocksize):
    """Make blocks out of a listlike object.

    Parameters
    ----------
    listlike : Iterable
        must be an iterable that supports slicing
    blocksize : int
        number of objects per block


    Returns
    -------
    List[List[Any]] :
        the input iterable chunked into blocks
    """
    n_objs = len(listlike)
    partial_block = 1 if n_objs % blocksize else 0
    n_blocks = (n_objs // blocksize) + partial_block
    minval = lambda i: i * blocksize
    maxval = lambda i: min((i + 1) * blocksize, n_objs)
    blocks = [listlike[minval(i):maxval(i)] for i in range(n_blocks)]
    return blocks