code: def __call__(self, results):
      image = results["image"]
      polygons = results["polys"]
      h, w = image.shape[:2]
  
      if np.random.random_sample() < self.pad_ratio:
          image, out_size = self.resize_img(image, keep_ratio=True)
          image, offset = self.square_pad(image)
      else:
          image, out_size = self.resize_img(image, keep_ratio=False)
          offset = (0, 0)
      results["image"] = image
      try:
          polygons[:, :, 0::2] = (
              polygons[:, :, 0::2] * out_size[1] / w + offset[0]
          )
          polygons[:, :, 1::2] = (
              polygons[:, :, 1::2] * out_size[0] / h + offset[1]
          )
      except:
          pass
      results["polys"] = polygons
  
      return results
  
imports: import numpy
  from PIL import Image, ImageDraw
  import cv2
  from shapely.geometry import Polygon
  import math
  from ppocr.utils.poly_nms import poly_intersection
label_desc: Use image node_id 5 for calling the SquareResizePad obj's underlying member method code with example usage: obj.__call__(results) and returns: results