code: def visualize_matting(image, data):
      try:
          import fastdeploy as fd
      except Exception:
          raise RuntimeError(
              "fastdeploy is required for visualizing results，please refer to "
              "https://github.com/PaddlePaddle/FastDeploy to install fastdeploy"
          )
      alpha = np.array(data["alpha"])
      foreground = np.array(data["foreground"])
      contain_foreground = data["contain_foreground"]
      shape = np.array(data["shape"])
  
      matting_result = fd.C.vision.MattingResult()
      matting_result.alpha = alpha
      matting_result.foreground = foreground
      matting_result.contain_foreground = contain_foreground
      matting_result.shape = shape
  
      result = fd.vision.vis_matting(image, matting_result)
      return result
  
file_path: VisualDL/visualdl/component/inference/fastdeploy_client/visualizer.py
imports: import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: visualize_matting(image, data) and returns: result