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 __call__(self, data):
      h, w = data["img"].shape[:2]
      short_edge = min(h, w)
      target = short_edge
      if (self.max_short is not None) and (short_edge > self.max_short):
          target = self.max_short
      elif (self.min_short is not None) and (
          short_edge < self.min_short
      ):
          target = self.min_short
  
      data["trans_info"].append(("resize", data["img"].shape[0:2]))
      if target != short_edge:
          data["img"] = functional.resize_short(data["img"], target)
          for key in data.get("gt_fields", []):
              if key == "trimap":
                  data[key] = functional.resize_short(
                      data[key], target, cv2.INTER_NEAREST
                  )
              else:
                  data[key] = functional.resize_short(data[key], target)
  
      return data
  
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 2 for calling the LimitShort obj's underlying member method code with example usage: obj.__call__(data) and returns: data