code: def post_process_image(output, image, target_size):
      old_size = image.shape[:2]
      ratio = min(np.divide(target_size, old_size))
      new_size = (int(old_size[0] * ratio), int(old_size[1] * ratio))
      post_processed = output[0 : new_size[0], 0 : new_size[1]]
      post_processed = imresize(
          post_processed,
          (old_size[1], old_size[0]),
          interpolate="nearest",
      )
      return post_processed
  
file_path: nnabla/python/src/nnabla/models/semantic_segmentation/utils.py
imports: import numpy
  from nnabla.models.semantic_segmentation import image_preprocess
  from nnabla.utils.image_utils import imsave, imresize
label_desc: Use image node_id 3 for calling a global function with example usage: post_process_image(output, image, target_size) and returns: post_processed