code: def resize(
      img: Image.Image,
      size: Union[List[int], int],
      interpolation: int = Image.BILINEAR,
  ) -> Image.Image:
      if not _is_pil_image(img):
          raise TypeError(f"img should be PIL Image. Got {type(img)}")
      if not (isinstance(size, list) and len(size) == 2):
          raise TypeError(f"Got inappropriate size arg: {size}")
  
      return img.resize(tuple(size[::-1]), interpolation)
  
imports: import numbers
  from typing import Any, Dict, List, Literal, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  from PIL import Image, ImageEnhance, ImageOps
label_desc: Use image node_id 14 for calling a global function with example usage: resize(img, size, interpolation) and returns: img