def chunked_sequence_iter(sequence, chunk_size):
    """
    Yield successive chunk_size sized chunks from sequence.
    """
    if not chunk_size > 0:
        raise ValueError('chunk_size must be > 0')
    for i in range(0, len(sequence), chunk_size):
        yield sequence[i:i + chunk_size]
