code: def resize_long(im, long_size=224, interpolation=cv2.INTER_LINEAR):
      value = max(im.shape[0], im.shape[1])
      scale = float(long_size) / float(value)
      resized_width = int(round(im.shape[1] * scale))
      resized_height = int(round(im.shape[0] * scale))
  
      im = cv2.resize(
          im,
          (resized_width, resized_height),
          interpolation=interpolation,
      )
      return im
  
imports: import cv2
  import numpy
  from PIL import Image, ImageEnhance
  from scipy.ndimage import distance_transform_edt
label_desc: Use image node_id 5 for calling a global function with example usage: resize_long(im, long_size, interpolation) and returns: im