code: def resize_clip(clip, size, interpolation="bilinear"):
      if isinstance(clip[0], np.ndarray):
          if isinstance(size, numbers.Number):
              im_h, im_w, im_c = clip[0].shape
              # Min spatial dim already matches minimal size
              if (im_w <= im_h and im_w == size) or (
                  im_h <= im_w and im_h == size
              ):
                  return clip
              new_h, new_w = get_resize_sizes(im_h, im_w, size)
              size = (new_w, new_h)
          else:
              size = size[0], size[1]
          if interpolation == "bilinear":
              np_inter = cv2.INTER_LINEAR
          else:
              np_inter = cv2.INTER_NEAREST
          scaled = [
              cv2.resize(img, size, interpolation=np_inter)
              for img in clip
          ]
      elif isinstance(clip[0], PIL.Image.Image):
          if isinstance(size, numbers.Number):
              im_w, im_h = clip[0].size
              # Min spatial dim already matches minimal size
              if (im_w <= im_h and im_w == size) or (
                  im_h <= im_w and im_h == size
              ):
                  return clip
              new_h, new_w = get_resize_sizes(im_h, im_w, size)
              size = (new_w, new_h)
          else:
              size = size[1], size[0]
          if interpolation == "bilinear":
              pil_inter = PIL.Image.BILINEAR
          else:
              pil_inter = PIL.Image.NEAREST
          scaled = [img.resize(size, pil_inter) for img in clip]
      else:
          raise TypeError(
              "Expected numpy.ndarray or PIL.Image"
              + "but got list of {0}".format(type(clip[0]))
          )
      return scaled
  
file_path: gluon-cv/gluoncv/torch/data/transforms/videotransforms/functional.py
imports: import numbers
  import cv2
  import numpy
  import PIL
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: resize_clip(clip, size, interpolation) and returns: scaled, clip, clip