class_docstr: Limit the long edge of image.
  
  If the long edge is larger than max_long, resize the long edge
  to max_long, while scale the short edge proportionally.
  
  If the long edge is smaller than min_long, resize the long edge
  to min_long, while scale the short edge proportionally.
  
  Args:
      max_long (int, optional): If the long edge of image is larger than max_long,
          it will be resize to max_long. Default: None.
      min_long (int, optional): If the long edge of image is smaller than min_long,
          it will be resize to min_long. Default: None.
class_docstr_tok: ["Limit","the","long","edge","of","image",".","If","the","long","edge","is","larger","than","max_long",",","resize","the","long","edge","to","max_long",",","while","scale","the","short","edge","proportionally",".","If","the","long","edge","is","smaller","than","min_long",",","resize","the","long","edge","to","min_long",",","while","scale","the","short","edge","proportionally",".","Args",":","max_long","(","int",",","optional",")",":","If","the","long","edge","of","image","is","larger","than","max_long",",","it","will","be","resize","to","max_long",".","Default",":","None",".","min_long","(","int",",","optional",")",":","If","the","long","edge","of","image","is","smaller","than","min_long",",","it","will","be","resize","to","min_long",".","Default",":","None","."]
code: def __init__(self, max_long=None, min_long=None):
      if max_long is not None:
          if not isinstance(max_long, int):
              raise TypeError(
                  "Type of `max_long` is invalid. It should be int, but it is {}".format(
                      type(max_long)
                  )
              )
      if min_long is not None:
          if not isinstance(min_long, int):
              raise TypeError(
                  "Type of `min_long` is invalid. It should be int, but it is {}".format(
                      type(min_long)
                  )
              )
      if (max_long is not None) and (min_long is not None):
          if min_long > max_long:
              raise ValueError(
                  "`max_long should not smaller than min_long, but they are {} and {}".format(
                      max_long, min_long
                  )
              )
      self.max_long = max_long
      self.min_long = min_long
  
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 LimitLong object  with example: obj = LimitLong(max_long, min_long)