def _visualize_simple(self, image_result: ImageResult) -> np.ndarray:
        """Generate a simple visualization for an image.

        The simple visualization mode only shows the model's predictions in a
        single image.

        Args:
            image_result (ImageResult): GT and Prediction data for a single image.

        Returns:
            np.ndarray: Image showing the simple visualization.

        Raises:
            ValueError: If task type is unknown.
        """
        if self.task == TaskType.SEGMENTATION:
            visualization = mark_boundaries(
                image_result.heat_map,
                image_result.pred_mask,
                color=(1, 0, 0),
                mode="thick",
            )
            return (visualization * 255).astype(np.uint8)
        if self.task == TaskType.CLASSIFICATION:
            if image_result.pred_label:
                image_classified = add_anomalous_label(image_result.image, image_result.pred_score)
            else:
                image_classified = add_normal_label(image_result.image, 1 - image_result.pred_score)
            return image_classified
        msg = f"Unknown task type: {self.task}"
        raise ValueError(msg)
Generate a simple visualization for an image.

        The simple visualization mode only shows the model's predictions in a
        single image.

        Args:
            image_result (ImageResult): GT and Prediction data for a single image.

        Returns:
            np.ndarray: Image showing the simple visualization.

        Raises:
            ValueError: If task type is unknown.
        
src/anomalib/utils/visualization/image.py