code: def resize_norm_img(self, img):
      imgC, imgH, imgW = self.sr_image_shape
      img = img.resize((imgW // 2, imgH // 2), Image.BICUBIC)
      img_numpy = np.array(img).astype("float32")
      img_numpy = img_numpy.transpose((2, 0, 1)) / 255
      return img_numpy
  
file_path: PaddleOCR/tools/infer/predict_sr.py
imports: import os
  import sys
  from PIL import Image
  import cv2
  import numpy
  import math
  import time
  import traceback
  import paddle
  import tools.infer.utility
  from ppocr.postprocess import build_post_process
  from ppocr.utils.logging import get_logger
  from ppocr.utils.utility import get_image_file_list, check_and_read
label_desc: Use image node_id 2 for calling the TextSR obj's underlying member method code with example usage: obj.resize_norm_img(img) and returns: img_numpy