<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def blockgen(bytes, block_size=16):
    ''' a block generator for pprp '''
    for i in range(0, len(bytes), block_size):
        block = bytes[i:i + block_size]
        block_len = len(block)
        if block_len > 0:
            yield block
        if block_len < block_size:
            break