def assert_same_output_types(prog1: Program, prog2: Program, func_name: str = "main"):
    """
    Check ``prog1`` and ``prog2`` have the same output dtypes.
    """
    prog1_output_types = [o.dtype for o in prog1[func_name].outputs]
    prog2_output_types = [o.dtype for o in prog2[func_name].outputs]
    assert prog1_output_types == prog2_output_types

    Check ``prog1`` and ``prog2`` have the same output dtypes.
    
coremltools/converters/mil/testing_utils.py