code: def video_resize(
      vid: torch.Tensor,
      size: Union[int, Tuple[int, int]],
      interpolation: str = "bilinear",
  ) -> torch.Tensor:
      # NOTE: using bilinear interpolation because we don't work on minibatches
      # at this level
      scale = None
      if isinstance(size, int):
          scale = float(size) / min(vid.shape[-2:])
          size = None
      return torch.nn.functional.interpolate(
          vid,
          size=size,
          scale_factor=scale,
          mode=interpolation,
          align_corners=False,
      )
  
file_path: mmf/mmf/datasets/processors/functional.py
imports: from typing import List, Tuple, Union
  import torch
label_desc: Use image node_id 4 for calling a global function with example usage: video_resize(vid, size, interpolation) and returns: torch