def threshold_batch(self, batch: Batch) -> None:
        """Apply thresholding to batch predictions.

        Args:
            batch (Batch): Batch containing model predictions.
        """
        batch.pred_label = (
            batch.pred_label
            if batch.pred_label is not None
            else self._apply_threshold(batch.pred_score, self.normalized_image_threshold)
        )
        batch.pred_mask = (
            batch.pred_mask
            if batch.pred_mask is not None
            else self._apply_threshold(batch.anomaly_map, self.normalized_pixel_threshold)
        )
Apply thresholding to batch predictions.

        Args:
            batch (Batch): Batch containing model predictions.
        
src/anomalib/post_processing/post_processor.py