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","."]
docstr: Args:
      short_edge_length ([int, int]): a [min, max] interval from which to sample the
          shortest edge length.
      max_size (int): maximum allowed longest edge length.
docstr_tok: ["Args",":","short_edge_length","(","[","int",",","int","]",")",":","a","[","min",",","max","]","interval","from","which","to","sample","the","shortest","edge","length",".","max_size","(","int",")",":","maximum","allowed","longest","edge","length","."]
code: def __init__(
      self, short_edge_length, max_size, interp=cv2.INTER_LINEAR
  ):
      """
      Args:
          short_edge_length ([int, int]): a [min, max] interval from which to sample the
              shortest edge length.
          max_size (int): maximum allowed longest edge length.
      """
      super(CustomResize, self).__init__()
      if isinstance(short_edge_length, int):
          short_edge_length = (short_edge_length, short_edge_length)
      self._init(locals())
  
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 1 to create a new CustomResize object from inherited base classes: ImageAugmentor with example: obj = CustomResize(short_edge_length, max_size, interp)