def test_dequantize_variable_unchanged(
        self, float_dtype, quant_dtype, is_scalar, is_zp_present
    ):
        """
        Input graph:
            input -> dequantize -> output

        Output graph:
            input -> dequantize -> output
        """

        if is_scalar:
            if is_zp_present:

                @mb.program(
                    input_specs=[
                        mb.TensorSpec(
                            shape=(1, 2, 3, 4, 5), dtype=numpy_type_to_builtin_type(quant_dtype)
                        )
                    ]
                )
                def prog(x):
                    y = mb.dequantize(input=x, scale=float_dtype(0.1), zero_point=quant_dtype(1))
                    return y

            else:

                @mb.program(
                    input_specs=[
                        mb.TensorSpec(
                            shape=(4, 3, 2, 1), dtype=numpy_type_to_builtin_type(quant_dtype)
                        )
                    ]
                )
                def prog(x):
                    y = mb.dequantize(input=x, scale=float_dtype(0.2))
                    return y

        else:
            if is_zp_present:

                @mb.program(
                    input_specs=[
                        mb.TensorSpec(shape=(3, 2), dtype=numpy_type_to_builtin_type(quant_dtype))
                    ]
                )
                def prog(x):
                    y = mb.dequantize(
                        input=x,
                        scale=np.array([0.1, 0.2, 0.3], dtype=float_dtype),
                        zero_point=np.array([1, 2, 3], dtype=quant_dtype),
                        axis=0,
                    )
                    return y

            else:

                @mb.program(
                    input_specs=[
                        mb.TensorSpec(shape=(2, 3), dtype=numpy_type_to_builtin_type(quant_dtype))
                    ]
                )
                def prog(x):
                    y = mb.dequantize(
                        input=x,
                        scale=np.array([0.4, 0.5, 0.6], dtype=float_dtype),
                        axis=1,
                    )
                    return y

        assert get_op_types_in_program(prog) == ["dequantize"]

        prev_prog, prev_block, block = apply_pass_and_basic_check(
            prog, "common::dequantize_to_constexpr"
        )
        assert get_op_types_in_program(prog) == ["dequantize"]

        Input graph:
            input -> dequantize -> output

        Output graph:
            input -> dequantize -> output
        
coremltools/converters/mil/mil/passes/tests/test_quantization_passes.py