code: def get_size(self, image_size):
      w, h = image_size
      size = random.choice(self.min_size)
      max_size = self.max_size
      if max_size is not None:
          min_original_size = float(min((w, h)))
          max_original_size = float(max((w, h)))
          if max_original_size / min_original_size * size > max_size:
              size = int(
                  math.floor(
                      max_size * min_original_size / max_original_size
                  )
              )
  
      if (w <= h and w == size) or (h <= w and h == size):
          return (h, w)
  
      if w < h:
          ow = size
          oh = int(size * h / w)
      else:
          oh = size
          ow = int(size * w / h)
  
      return (oh, ow)
  
imports: import collections
  import math
  import random
  import warnings
  import torch
  from mmf.common.constants import INCEPTION_IMAGE_NORMALIZE
  from mmf.common.registry import registry
  from mmf.datasets.processors.processors import BaseProcessor
  from omegaconf import OmegaConf
  from torchvision import transforms
  from torchvision.transforms import Compose, Normalize, Resize, ToTensor
label_desc: Use image node_id 2 for calling the ResizeShortest obj's underlying member method code with example usage: obj.get_size(image_size) and returns: oh,  ow, h,  w