def visualize_image(self, image_result: ImageResult) -> np.ndarray:
        """Generate the visualization for an image.

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

        Returns:
            np.ndarray: The full or simple visualization for the image.

        Raises:
            ValueError: If visualization mode is unknown.
        """
        if self.mode == VisualizationMode.FULL:
            return self._visualize_full(image_result)
        if self.mode == VisualizationMode.SIMPLE:
            return self._visualize_simple(image_result)
        msg = f"Unknown visualization mode: {self.mode}"
        raise ValueError(msg)
Generate the visualization for an image.

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

        Returns:
            np.ndarray: The full or simple visualization for the image.

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