from typing import List


def chunked(list_: List, chunksize: int=20) -> List[List]:
    """
    Partitions list into chunks of a given size.

    NOTE: Octopart enforces that its 'parts/match' endpoint take no more
    than 20 queries in a single request.

    Args:
        list_: list to be partitioned
        chunksize: size of resulting chunks

    Returns:
        list of lists.
    """
    chunks: List[List] = []
    for i in range(0, len(list_), chunksize):
        chunks.append(list_[i:i + chunksize])
    return chunks