def _check_no_output_connection(block: Block, ops: List[Operation]) -> bool:
    """
    Check that none of the op in this pattern is connected to the output
    (except the last op)

    :param block: Block
    :param ops: List of operations to check on.
    """
    for op in ops[:-1]:
        for out in op.outputs:
            if out in block.outputs:
                return False
    return True

    Check that none of the op in this pattern is connected to the output
    (except the last op)

    :param block: Block
    :param ops: List of operations to check on.
    
coremltools/converters/mil/mil/passes/helper.py