docstr: Resize image to target size. if keep_ratio is True, 
  resize the image's long side to the maximum of target_size
  if keep_ratio is False, resize the image to target size(h, w)
  Args:
      target_size (int|list): image target size
      keep_ratio (bool): whether keep_ratio or not, default true
      interp (int): the interpolation method
docstr_tok: ["Resize","image","to","target","size",".","if","keep_ratio","is","True",",","resize","the","image","'s","long","side","to","the","maximum","of","target_size","if","keep_ratio","is","False",",","resize","the","image","to","target","size","(","h",",","w",")","Args",":","target_size","(","int|list",")",":","image","target","size","keep_ratio","(","bool",")",":","whether","keep_ratio","or","not",",","default","true","interp","(","int",")",":","the","interpolation","method"]
code: def __init__(self, target_size, keep_ratio, interp=cv2.INTER_LINEAR):
      """
      Resize image to target size. if keep_ratio is True,
      resize the image's long side to the maximum of target_size
      if keep_ratio is False, resize the image to target size(h, w)
      Args:
          target_size (int|list): image target size
          keep_ratio (bool): whether keep_ratio or not, default true
          interp (int): the interpolation method
      """
      super(RResize, self).__init__()
      self.keep_ratio = keep_ratio
      self.interp = interp
      if not isinstance(target_size, (Integral, Sequence)):
          raise TypeError(
              "Type of target_size is invalid. Must be Integer or List or Tuple, now is {}".format(
                  type(target_size)
              )
          )
      if isinstance(target_size, Integral):
          target_size = [target_size, target_size]
      self.target_size = target_size
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  from numbers import Number, Integral
  import cv2
  import numpy
  import math
  import copy
  from .operators import register_op, BaseOperator
  from ppdet.modeling.rbox_utils import poly2rbox_le135_np, poly2rbox_oc_np, rbox2poly_np
  from ppdet.utils.logger import setup_logger
  from ppdet.utils.compact import imagedraw_textsize_c
label_desc: Use image node_id 1 to create a new RResize object from inherited base classes: BaseOperator with example: obj = RResize(target_size, keep_ratio, interp)