class_docstr: Limit the short edge of image.
  
  If the short edge is larger than max_short, resize the short edge
  to max_short, while scale the long edge proportionally.
  
  If the short edge is smaller than min_short, resize the short edge
  to min_short, while scale the long edge proportionally.
  
  Args:
      max_short (int, optional): If the short edge of image is larger than max_short,
          it will be resize to max_short. Default: None.
      min_short (int, optional): If the short edge of image is smaller than min_short,
          it will be resize to min_short. Default: None.
class_docstr_tok: ["Limit","the","short","edge","of","image",".","If","the","short","edge","is","larger","than","max_short",",","resize","the","short","edge","to","max_short",",","while","scale","the","long","edge","proportionally",".","If","the","short","edge","is","smaller","than","min_short",",","resize","the","short","edge","to","min_short",",","while","scale","the","long","edge","proportionally",".","Args",":","max_short","(","int",",","optional",")",":","If","the","short","edge","of","image","is","larger","than","max_short",",","it","will","be","resize","to","max_short",".","Default",":","None",".","min_short","(","int",",","optional",")",":","If","the","short","edge","of","image","is","smaller","than","min_short",",","it","will","be","resize","to","min_short",".","Default",":","None","."]
code: def __init__(self, max_short=None, min_short=None):
      if max_short is not None:
          if not isinstance(max_short, int):
              raise TypeError(
                  "Type of `max_short` is invalid. It should be int, but it is {}".format(
                      type(max_short)
                  )
              )
      if min_short is not None:
          if not isinstance(min_short, int):
              raise TypeError(
                  "Type of `min_short` is invalid. It should be int, but it is {}".format(
                      type(min_short)
                  )
              )
      if (max_short is not None) and (min_short is not None):
          if min_short > max_short:
              raise ValueError(
                  "`max_short should not smaller than min_short, but they are {} and {}".format(
                      max_short, min_short
                  )
              )
      self.max_short = max_short
      self.min_short = min_short
  
imports: import os
  import random
  import string
  import cv2
  import numpy
  from paddleseg.transforms import functional
  from paddleseg.cvlibs import manager
  from paddleseg.utils import seg_env
  from PIL import Image
label_desc: Use image node_id 1 to create a new LimitShort object  with example: obj = LimitShort(max_short, min_short)