def _validate_child_constexpr_for_compress(self, op: Operation) -> bool:
        """
        Determines which pattern supports joint compression.

        In iOS18 joint compression, the quantized/sparsified data could be further palettized.
        For each specific op, we only palettize the specific input:
        - constexpr_sparse_to_dense's nonzero_data
        - constexpr_blockwise_shift_scale's data
        """
        if (
            is_current_opset_version_compatible_with(AvailableTarget.iOS18)
            and self.joint_compression
        ):
            if len(op.outputs[0].child_ops) == 1:
                child_op = op.outputs[0].child_ops[0]
                if (
                    child_op.op_type == "constexpr_sparse_to_dense"
                    and child_op.nonzero_data == op.outputs[0]
                ):
                    return True
                elif (
                    child_op.op_type == "constexpr_blockwise_shift_scale"
                    and child_op.data == op.outputs[0]
                ):
                    return True

        return super()._validate_child_constexpr_for_compress(op)

        Determines which pattern supports joint compression.

        In iOS18 joint compression, the quantized/sparsified data could be further palettized.
        For each specific op, we only palettize the specific input:
        - constexpr_sparse_to_dense's nonzero_data
        - constexpr_blockwise_shift_scale's data
        
coremltools/optimize/coreml/_quantization_passes.py