code: def resize_long(
      im: np.ndarray,
      long_size: int,
      interpolation: int = cv2.INTER_LINEAR,
  ) -> np.ndarray:
      """
      Resize the long side of the input image to the target size.
  
      Args:
          im(np.ndarray): Input image.
          long_size(int|list[int]): The target size of long side.
          interpolation(int): Interpolation method. Default to 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
  
file_path: PaddleHub/paddlehub/vision/functional.py
imports: import os
  from typing import List, Union
  import cv2
  import PIL
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: resize_long(im, long_size, interpolation) and returns: im