class_docstr: Try resizing the shortest edge to a certain number
  while avoiding the longest edge to exceed max_size.
class_docstr_tok: ["Try","resizing","the","shortest","edge","to","a","certain","number","while","avoiding","the","longest","edge","to","exceed","max_size","."]
code: def get_transform(self, img):
      h, w = img.shape[:2]
      size = self.rng.randint(
          self.short_edge_length[0], self.short_edge_length[1] + 1
      )
      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)
      return ResizeTransform(h, w, newh, neww, self.interp)
  
file_path: tensorpack/examples/FasterRCNN/common.py
imports: import numpy
  import cv2
  from tensorpack.dataflow import RNGDataFlow
  from tensorpack.dataflow.imgaug import ImageAugmentor, ResizeTransform
label_desc: Use image node_id 2 for calling the CustomResize obj's underlying member method code with example usage: obj.get_transform(img) and returns: ResizeTransform