def final_eos_is_already_included(header_block: Union[(UnfinishedHeaderBlock, UnfinishedBlock, HeaderBlock, FullBlock)], blocks: BlockchainInterface, sub_slot_iters: uint64) -> bool:
    '\n    Args:\n        header_block: An overflow block, with potentially missing information about the new sub slot\n        blocks: all blocks that have been included before header_block\n        sub_slot_iters: sub_slot_iters at the header_block\n\n    Returns: True iff the missing sub slot was already included in a previous block. Returns False if the sub\n    slot was not included yet, and therefore it is the responsibility of this block to include it\n\n    '
    if (len(header_block.finished_sub_slots) > 0):
        return False
    curr: BlockRecord = blocks.block_record(header_block.prev_header_hash)
    seen_overflow_block = (curr.overflow and ((header_block.total_iters - curr.total_iters) < (sub_slot_iters // 2)))
    while ((not curr.first_in_sub_slot) and (not (curr.height == 0))):
        if (curr.overflow and ((header_block.total_iters - curr.total_iters) < (sub_slot_iters // 2))):
            seen_overflow_block = True
        curr = blocks.block_record(curr.prev_hash)
    if (curr.first_in_sub_slot and seen_overflow_block):
        return True
    return False
Args:
    header_block: An overflow block, with potentially missing information about the new sub slot
    blocks: all blocks that have been included before header_block
    sub_slot_iters: sub_slot_iters at the header_block

Returns: True iff the missing sub slot was already included in a previous block. Returns False if the sub
slot was not included yet, and therefore it is the responsibility of this block to include it
def final_eos_is_already_included(header_block: Union[(UnfinishedHeaderBlock, UnfinishedBlock, HeaderBlock, FullBlock)], blocks: BlockchainInterface, sub_slot_iters: uint64) -> bool:
    '\n    Args:\n        header_block: An overflow block, with potentially missing information about the new sub slot\n        blocks: all blocks that have been included before header_block\n        sub_slot_iters: sub_slot_iters at the header_block\n\n    Returns: True iff the missing sub slot was already included in a previous block. Returns False if the sub\n    slot was not included yet, and therefore it is the responsibility of this block to include it\n\n    '
    if (len(header_block.finished_sub_slots) > 0):
        return False
    curr: BlockRecord = blocks.block_record(header_block.prev_header_hash)
    seen_overflow_block = (curr.overflow and ((header_block.total_iters - curr.total_iters) < (sub_slot_iters // 2)))
    while ((not curr.first_in_sub_slot) and (not (curr.height == 0))):
        if (curr.overflow and ((header_block.total_iters - curr.total_iters) < (sub_slot_iters // 2))):
            seen_overflow_block = True
        curr = blocks.block_record(curr.prev_hash)
    if (curr.first_in_sub_slot and seen_overflow_block):
        return True
    return False