code: def resize_norm_img(self, img, max_wh_ratio):
      imgC, imgH, imgW = self.rec_image_shape
      if self.character_type == "ch":
          imgW = int(32 * max_wh_ratio)
      h = img.shape[0]
      w = img.shape[1]
      ratio = w / float(h)
      if math.ceil(imgH * ratio) > imgW:
          resized_w = imgW
      else:
          resized_w = int(math.ceil(imgH * ratio))
      resized_image = cv2.resize(img, (resized_w, imgH))
      resized_image = resized_image.astype("float32")
      resized_image = resized_image.transpose((2, 0, 1)) / 255
      resized_image -= 0.5
      resized_image /= 0.5
      padding_im = np.zeros((imgC, imgH, imgW), dtype=np.float32)
  
      padding_im[:, :, 0:resized_w] = resized_image
      return padding_im
  
imports: import cv2
  import copy
  import numpy
  import math
  import re
  import sys
  import argparse
  import string
  from copy import deepcopy
label_desc: Use image node_id 2 for calling the OCRReader obj's underlying member method code with example usage: obj.resize_norm_img(img, max_wh_ratio) and returns: padding_im