code: def pre_process_image(image, target_h, target_w):
      processed_image = image_preprocess.preprocess_image_and_label(
          image, target_w, target_h
      )
      processed_image = np.transpose(processed_image, (2, 0, 1))
      processed_image = np.reshape(
          processed_image,
          (
              1,
              processed_image.shape[0],
              processed_image.shape[1],
              processed_image.shape[2],
          ),
      )
      return processed_image
  
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 2 for calling a global function with example usage: pre_process_image(image, target_h, target_w) and returns: processed_image