@staticmethod
def _validate_window_size(k):
    """check if k is a positive integer"""
    if not isinstance(k, int):
        raise TypeError('window_size must be integer type, got {}'.format(
            type(k).__name__))
    if k <= 0:
        raise ValueError('window_size must be positive')
    return k
