def make_blocks(ec_infos, codewords):
    """\
    Returns the data and error blocks.

    :param ec_infos: Iterable of ECC information
    :param codewords: Iterable of (integer) code words.
    """
    data_blocks, error_blocks = [], []
    offset = 0
    for ec_info in ec_infos:
        for i in range(ec_info.num_blocks):
            block = codewords[offset:offset + ec_info.num_data]
            data_blocks.append(block)
            error_blocks.append(make_error_block(ec_info, block))
            offset += ec_info.num_data
    return data_blocks, error_blocks
\
    Returns the data and error blocks.

    :param ec_infos: Iterable of ECC information
    :param codewords: Iterable of (integer) code words.