code: def preprocess(org_im, shrink):
      image = org_im.copy()
      image_height, image_width, image_channel = image.shape
      if shrink != 1:
          image_height, image_width = int(image_height * shrink), int(
              image_width * shrink
          )
          image = cv2.resize(
              image, (image_width, image_height), cv2.INTER_NEAREST
          )
      # HWC to CHW
      if len(image.shape) == 3:
          image = np.swapaxes(image, 1, 2)
          image = np.swapaxes(image, 1, 0)
      # mean, std
      mean = [104.0, 117.0, 123.0]
      scale = 0.007843
      image = image.astype("float32")
      image -= np.array(mean)[:, np.newaxis, np.newaxis].astype(
          "float32"
      )
      image = image * scale
      return image, image_height, image_width
  
imports: import os
  import time
  from collections import OrderedDict
  import cv2
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: preprocess(org_im, shrink) and returns: image,  image_height,  image_width