def test_constexpr_const_not_compressed(constexpr_op):
        """
        The const op which is fed into constexpr ops cannot be compressed.
        """
        @mb.program(input_specs=[mb.TensorSpec(shape=(2, 3, 4, 5))])
        def prog(x):
            constexpr = CONSTEXPR_FUNCS[constexpr_op]((2, 3, 4, 5))
            return mb.add(x=x, y=constexpr)

        compressor = quantization.palettize_weights(
            config=cto.coreml.OptimizationConfig(
                global_config=cto.coreml.OpPalettizerConfig(nbits=2, mode="KMEANS", weight_threshold=0),
            )
        )
        compressor.apply(prog)
        expected_ops = [constexpr_op, "add"]
        assert get_op_types_in_program(prog) == expected_ops

        The const op which is fed into constexpr ops cannot be compressed.
        
coremltools/test/optimize/coreml/test_passes.py