def chunkify(files_list, chunksize=1000):
    """
    Create a list of chunks.

    Each chunk is a list itself, with size `chunksize`.

    Arguments:
      files_list: list: A list of Path objects
      chunksize: int: Size of each chunk

    Return:
      chunks: list: A list of lists. Each nested list has size
        `chunksize`.
    """
    chunks = []
    for i in range(0, len(files_list), chunksize):
        chunk = files_list[i : i + chunksize]
        chunks.append(chunk)
    return chunks