code: def test_visualize_fully_defected_masks():
      """Test if a fully defected anomaly mask results in a completely white image."""
  
      # create visualizer and add fully defected mask
      visualizer = ImageGrid()
      mask = np.ones((256, 256)) * 255
      visualizer.add_image(
          image=mask, color_map="gray", title="fully defected mask"
      )
      visualizer.generate()
  
      # retrieve plotted image
      canvas = FigureCanvas(visualizer.figure)
      canvas.draw()
      plotted_img = visualizer.axis.images[0].make_image(
          canvas.renderer
      )
  
      # assert that the plotted image is completely white
      assert np.all(plotted_img[0][..., 0] == 255)
  
file_path: anomalib/tests/pre_merge/post_processing/test_visualizer.py
imports: import tempfile
  import numpy
  import pytest
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from anomalib.data import TaskType
  from anomalib.post_processing.visualizer import ImageGrid
  from tests.helpers.dataset import TestDataset
  from tests.helpers.model import setup_model_train
label_desc: Use image node_id 1 for calling a global function with example usage: test_visualize_fully_defected_masks() without return types