code: def render_mask(mask):
      if isinstance(mask, np.ndarray):
          mask = Image.fromarray(mask)
      mask.putpalette(vocpallete)
      mask = mask.convert(mode="RGB")
      return mask
  
file_path: ignite/examples/references/segmentation/pascal_voc2012/vis.py
imports: import numpy
  import torch
  from PIL import Image
label_desc: Use image node_id 2 for calling a global function with example usage: render_mask(mask) and returns: mask