def test_input_duplicate_output(self):
        """
        Input graph:
        input -----> out (consist of duplicated input)

        Output graph:
        input -----> out (consist of duplicated input)

        Notice that a temp identity sink is added for all outputs, so the block before going through the pass is:
            function[CoreML3](%x: (2, 2, 1, 1, fp32)(Tensor)) {
              block0() {
                %identity_0: (2, 2, 1, 1, fp32)(Tensor) = identity(x=%x, name="identity_0")
              } -> (%identity_0, %identity_0)
            }
        """

        @mb.program(input_specs=[mb.TensorSpec(shape=(2, 2, 1, 1))])
        def prog(x):
            return x, x

        prev_prog, prev_block, block = apply_pass_and_basic_check(prog, "common::reduce_transposes")

        self.assertEqual(get_op_types_in_program(prev_prog), [])
        self.assertEqual(get_op_types_in_program(prog), [])
        assert_model_is_valid(
            prog,
            {"x": (2, 2, 1, 1)},
            backend=("mlprogram", "fp16"),
            expected_output_shapes={
                block.outputs[0].name: (2, 2, 1, 1),
                block.outputs[1].name: (2, 2, 1, 1),
            },
        )

        Input graph:
        input -----> out (consist of duplicated input)

        Output graph:
        input -----> out (consist of duplicated input)

        Notice that a temp identity sink is added for all outputs, so the block before going through the pass is:
            function[CoreML3](%x: (2, 2, 1, 1, fp32)(Tensor)) {
              block0() {
                %identity_0: (2, 2, 1, 1, fp32)(Tensor) = identity(x=%x, name="identity_0")
              } -> (%identity_0, %identity_0)
            }
        
coremltools/converters/mil/mil/passes/tests/test_reduce_transposes_pass.py