code: def _sanity_check_construct_result_block(ir_blocks):
      
      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))
docs: Assert that ConstructResult is always the last block, and only the last block.