<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _sanity_check_construct_result_block(ir_blocks):
 """Assert that ConstructResult is always the last block, and only the last block."""

    if not isinstance(ir_blocks[-1], ConstructResult):
        raise AssertionError(u'The last block was not ConstructResult: {}'.format(ir_blocks))
    for block in ir_blocks[:-1]:
        if isinstance(block, ConstructResult):
            raise AssertionError(u'Found ConstructResult before the last block: '
                                 u'{}'.format(ir_blocks))