def _process_sensitivity(self, sensitivity_path: _Optional[str] = None) -> _Dict[str, _Any]:
        """
        Post process the sensitivity values to normalize them.
        """
        raw_sensitivity_dict = _torch.load(self._get_sensitivity_path(sensitivity_path))
        sensitivity_dict = dict()
        for key, val in raw_sensitivity_dict.items():
            # Since optimizer sets param value as: p <= p - learning_rate * (grad**2),
            # we need to negate the values to get grad**2
            val = 100 * -val
            if len(val.nonzero()) == 0:
                val[val == 0] = 1.0

            # normalize sensitivity between 0 and 1
            val = val / _torch.max(val)

            # Clipping very small or zero sensitivity values stabilizes k-means,
            # they can lead to divergence otherwise
            val[val == 0] = _torch.min(val[val != 0])
            val[val < self._SENSITIVITY_CLIP_THR] = self._SENSITIVITY_CLIP_THR

            sensitivity_dict[key] = val

        # If user wants to save sensitivity values at the specified path
        # we save them in the processed state
        if sensitivity_path is not None:
            _torch.save(sensitivity_dict, sensitivity_path)
        return sensitivity_dict

        Post process the sensitivity values to normalize them.
        
coremltools/optimize/torch/palettization/sensitive_k_means.py