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_to_keypoint(
      self,
      keypoint: KeypointInternalType,
      max_size: int = 1024,
      **params,
  ) -> KeypointInternalType:
      height = params["rows"]
      width = params["cols"]
  
      scale = max_size / max([height, width])
      return F.keypoint_scale(keypoint, scale, scale)
  
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 4 for calling the LongestMaxSize obj's underlying member method code with example usage: obj.apply_to_keypoint(keypoint, max_size) and returns: F