code: def random_short_side_scale_jitter(
      images,
      min_size,
      max_size,
      boxes=None,
      inverse_uniform_sampling=False,
  ):
      """
      Perform a spatial short scale jittering on the given images and
      corresponding boxes.
      Args:
          images (tensor): images to perform scale jitter. Dimension is
              `num frames` x `channel` x `height` x `width`.
          min_size (int): the minimal size to scale the frames.
          max_size (int): the maximal size to scale the frames.
          boxes (ndarray): optional. Corresponding boxes to images.
              Dimension is `num boxes` x 4.
          inverse_uniform_sampling (bool): if True, sample uniformly in
              [1 / max_scale, 1 / min_scale] and take a reciprocal to get the
              scale. If False, take a uniform sample from [min_scale, max_scale].
      Returns:
          (tensor): the scaled images with dimension of
              `num frames` x `channel` x `new height` x `new width`.
          (ndarray or None): the scaled boxes with dimension of
              `num boxes` x 4.
      """
      if inverse_uniform_sampling:
          size = int(
              round(
                  1.0
                  / np.random.uniform(1.0 / max_size, 1.0 / min_size)
              )
          )
      else:
          size = int(round(np.random.uniform(min_size, max_size)))
  
      height = images.shape[2]
      width = images.shape[3]
      if (width <= height and width == size) or (
          height <= width and height == size
      ):
          return images, boxes
      new_width = size
      new_height = size
      if width < height:
          new_height = int(math.floor((float(height) / width) * size))
          if boxes is not None:
              boxes = boxes * float(new_height) / height
      else:
          new_width = int(math.floor((float(width) / height) * size))
          if boxes is not None:
              boxes = boxes * float(new_width) / width
  
      return (
          torch.nn.functional.interpolate(
              images,
              size=(new_height, new_width),
              mode="bilinear",
              align_corners=False,
          ),
          boxes,
      )
  
imports: import logging
  import math
  import numpy
  import random
  import torch
  import torchvision
  import torchvision.transforms.functional
  from PIL import Image, ImageFilter
  from scipy.ndimage import gaussian_filter
  from torchvision import transforms
  from .rand_augment import rand_augment_transform
  from .random_erasing import RandomErasing
label_desc: Use image node_id 2 for calling a global function with example usage: random_short_side_scale_jitter(images, min_size, max_size, boxes, inverse_uniform_sampling) and returns: torch,  boxes, images,  boxes