def _compute_outlier_mask(self, sensitivity: _torch.Tensor, outliers: float) -> _torch.Tensor:
        """
        Compute outlier masks using the sensitivity values.
        """
        sensitivity_flat = sensitivity.flatten()
        numel = sensitivity_flat.numel()
        num_outliers = int(numel * (outliers / 100.0))
        mask = _torch.ones_like(sensitivity_flat, dtype=_torch.bool)
        mask[_torch.argsort(sensitivity_flat, descending=True)[:num_outliers]] = False
        return mask.reshape(sensitivity.shape)

        Compute outlier masks using the sensitivity values.
        
coremltools/optimize/torch/palettization/sensitive_k_means.py