code: def __call__(self, imgs: List[torch.Tensor]):
      img_augs = []
      for img in imgs:
          h, w = img.shape[:2]
          # later: provide list and randomly choose index for resize
          size = np.random.randint(
              self.short_edge_length[0], self.short_edge_length[1] + 1
          )
          if size == 0:
              return img
          scale = size * 1.0 / min(h, w)
          if h < w:
              newh, neww = size, scale * w
          else:
              newh, neww = scale * h, size
          if max(newh, neww) > self.max_size:
              scale = self.max_size * 1.0 / max(newh, neww)
              newh = newh * scale
              neww = neww * scale
          neww = int(neww + 0.5)
          newh = int(newh + 0.5)
  
          if img.dtype == np.uint8:
              pil_image = Image.fromarray(img)
              pil_image = pil_image.resize((neww, newh), Image.BILINEAR)
              img = np.asarray(pil_image)
          else:
              img = img.permute(2, 0, 1).unsqueeze(
                  0
              )  # 3, 0, 1)  # hw(c) -> nchw
              img = F.interpolate(
                  img,
                  (newh, neww),
                  mode=self.interp_method,
                  align_corners=False,
              ).squeeze(0)
          img_augs.append(img)
  
      return img_augs
  
imports: import os
  import sys
  from dataclasses import dataclass
  from typing import List
  import numpy
  import omegaconf
  import torch
  import torch.nn.functional
  from mmf.common.registry import registry
  from mmf.datasets.processors.processors import BaseProcessor
  from mmf.utils.download import get_image_from_url
  from PIL import Image
label_desc: Use image node_id 2 for calling the ResizeShortestEdge obj's underlying member method code with example usage: obj.__call__(imgs) and returns: img_augs, img