code: def preprocess(im_path, transforms):
      data = {}
      data["img"] = im_path
      data = transforms(data)
      data["img"] = data["img"][np.newaxis, ...]
      data["img"] = paddle.to_tensor(data["img"])
      return data
  
file_path: PaddleSeg/contrib/RSSegBenchmark/c2fnet/core/predict.py
imports: import os
  import math
  import cv2
  import numpy
  import paddle
  from paddleseg import utils
  from paddleseg.utils import logger, progbar, visualize
  from core import infer
label_desc: Use image node_id 3 for calling a global function with example usage: preprocess(im_path, transforms) and returns: data