code: def test_draw_soft_mask(self):
      img = np.random.rand(100, 100, 3) * 255
      img[:, :, 0] = 0  # remove red color
      mask = np.zeros((100, 100), dtype=np.float32)
      mask[30:50, 40:50] = 1.0
      cv2.GaussianBlur(mask, (21, 21), 10)
  
      v = Visualizer(img)
      o = v.draw_soft_mask(mask, color="red", text="test")
      o = o.get_image().astype("float32")
      # red color is drawn on the image
      self.assertTrue(o[:, :, 0].sum() > 0)
  
      # test draw empty mask
      v = Visualizer(img)
      o = v.draw_soft_mask(
          np.zeros((100, 100), dtype=np.float32),
          color="red",
          text="test",
      )
      o = o.get_image().astype("float32")
  
imports: import numpy
  import os
  import tempfile
  import unittest
  import cv2
  import torch
  from detectron2.data import MetadataCatalog
  from detectron2.structures import BoxMode, Instances, RotatedBoxes
  from detectron2.utils.visualizer import ColorMode, Visualizer
label_desc: Use image node_id 14 for calling the TestVisualizer obj's underlying member method code with example usage: obj.test_draw_soft_mask() without return types