code: def __call__(self, img):
      # Resize the longest side to self.size.
      img_size_hw = np.array((img.size[1], img.size[0]))
      ratio = float(self.size) / np.max(img_size_hw)
      new_size = tuple(np.round(img_size_hw * ratio).astype(np.int32))
      img_resized = img.resize(
          (new_size[1], new_size[0]), Image.BILINEAR
      )
  
      return img_resized
  
file_path: vissl/vissl/data/ssl_transforms/img_pil_resize_larger_side.py
imports: from typing import Any, Dict
  import numpy
  from classy_vision.dataset.transforms import register_transform
  from classy_vision.dataset.transforms.classy_transform import ClassyTransform
  from PIL import Image
label_desc: Use image node_id 2 for calling the ImgPilResizeLargerSide obj's underlying member method code with example usage: obj.__call__(img) and returns: img_resized