def test_multiple_inputs_to_single_operation(self):
        """
        Input graph:
            input1 -|
                    |-> concat -> output
            input2 -|

        Output graph:
            input1 -> cast(fp32->fp16) -|
                                        |-> concat -> cast(fp16->fp32) -> output
            input2 -> cast(fp32->fp16) -|
        """

        @mb.program(input_specs=[mb.TensorSpec(shape=(10, 20)), mb.TensorSpec(shape=(10, 20))])
        def prog(x, y):
            x = mb.concat(values=(x, y), axis=0)
            return x

        self.assertEqual(get_op_types_in_program(prog), ["concat"])

        apply_pass_and_basic_check(
            prog, quantization.FP16ComputePrecision(op_selector=lambda op: True)
        )
        _, _, block = apply_pass_and_basic_check(prog, "common::dead_code_elimination")

        self.assertEqual(get_op_types_in_program(prog), ["cast", "cast", "concat", "cast"])

        # Asserting first cast configuration
        cast_1 = block.find_ops(op_type="cast")[0]
        self.assertEqual(cast_1.dtype.val, "fp16")
        self.assertEqual(len(cast_1.outputs), 1)
        self.assertEqual(len(cast_1.outputs[0].child_ops), 1)
        self.assertEqual(cast_1.outputs[0].child_ops[0].op_type, "concat")

        # Asserting second cast configuration
        cast_2 = block.find_ops(op_type="cast")[1]
        self.assertEqual(cast_2.dtype.val, "fp16")
        self.assertEqual(len(cast_2.outputs), 1)
        self.assertEqual(len(cast_2.outputs[0].child_ops), 1)
        self.assertEqual(cast_2.outputs[0].child_ops[0].op_type, "concat")

        # Asserting third cast configuration
        cast_3 = block.find_ops(op_type="cast")[2]
        self.assertEqual(cast_3.dtype.val, "fp32")
        self.assertEqual(len(cast_3.outputs), 1)
        self.assertEqual(len(cast_3.outputs[0].child_ops), 0)

        assert_model_is_valid(
            prog,
            {"x": (10, 20), "y": (10, 20)},
            expected_output_shapes={block.outputs[0].name: (20, 20)},
        )

        Input graph:
            input1 -|
                    |-> concat -> output
            input2 -|

        Output graph:
            input1 -> cast(fp32->fp16) -|
                                        |-> concat -> cast(fp16->fp32) -> output
            input2 -> cast(fp32->fp16) -|
        
coremltools/converters/mil/mil/passes/tests/test_quantization_passes.py