class_docstr: Rescale an image so that maximum side is equal to max_size, keeping the aspect ratio of the initial image.
  
  Args:
      max_size (int, list of int): maximum size of the image after the transformation. When using a list, max size
          will be randomly selected from the values in the list.
      interpolation (OpenCV flag): interpolation method. Default: cv2.INTER_LINEAR.
      p (float): probability of applying the transform. Default: 1.
  
  Targets:
      image, mask, bboxes, keypoints
  
  Image types:
      uint8, float32
code: def apply(
      self,
      img: np.ndarray,
      max_size: int = 1024,
      interpolation: int = cv2.INTER_LINEAR,
      **params,
  ) -> np.ndarray:
      return F.longest_max_size(
          img, max_size=max_size, interpolation=interpolation
      )
  
imports: import random
  from typing import Dict, Sequence, Tuple, Union
  import cv2
  import numpy
  from ...core.transforms_interface import BoxInternalType, DualTransform, KeypointInternalType, to_tuple
  from .None import functional
label_desc: Use image node_id 2 for calling the LongestMaxSize obj's underlying member method code with example usage: obj.apply(img, max_size, interpolation) and returns: F