class_docstr: Randomly rescale width and height of the image.
code: def get_transform(self, img):
      cnt = 0
      h, w = img.shape[:2]
  
      def get_dest_size():
          if self._is_scale:
              sx = self._rand_range(*self.xrange)
              if self.aspect_ratio_thres == 0:
                  sy = sx
              else:
                  sy = self._rand_range(*self.yrange)
              destX = max(sx * w, self.minimum[0])
              destY = max(sy * h, self.minimum[1])
          else:
              sx = self._rand_range(*self.xrange)
              if self.aspect_ratio_thres == 0:
                  sy = sx * 1.0 / w * h
              else:
                  sy = self._rand_range(*self.yrange)
              destX = max(sx, self.minimum[0])
              destY = max(sy, self.minimum[1])
          return (int(destX + 0.5), int(destY + 0.5))
  
      while True:
          destX, destY = get_dest_size()
          if self.aspect_ratio_thres > 0:  # don't check when thres == 0
              oldr = w * 1.0 / h
              newr = destX * 1.0 / destY
              diff = abs(newr - oldr) / oldr
              if diff >= self.aspect_ratio_thres + 1e-5:
                  cnt += 1
                  if cnt > 50:
                      logger.warn(
                          "RandomResize failed to augment an image"
                      )
                      return ResizeTransform(h, w, h, w, self.interp)
                  continue
          return ResizeTransform(h, w, destY, destX, self.interp)
  
imports: import cv2
  from ...utils import logger
  from ...utils.argtools import shape2d
  from .base import ImageAugmentor
  from .transform import ResizeTransform, NoOpTransform, FlipTransform, TransposeTransform
label_desc: Use image node_id 2 for calling the RandomResize obj's underlying member method code with example usage: obj.get_transform(img) and returns: int,  int, ResizeTransform, ResizeTransform