def _validate_chunksize(chunksize: int) ->None:
    """
    Raises the proper exception if chunksize is not valid.

    Parameters
    ----------
    chunksize: int
    The chunksize to validate.
    """
    if not isinstance(chunksize, int):
        raise TypeError('Invalid chunksize: Must be an int')
    if not chunksize > 0:
        raise ValueError('Invalid chunksize: Must be > 0')
