code: def _classify_text(self, image_list, angle_classification_thresh=0.9):
      img_list = copy.deepcopy(image_list)
      img_num = len(img_list)
      # Calculate the aspect ratio of all text bars
      width_list = []
      for img in img_list:
          width_list.append(img.shape[1] / float(img.shape[0]))
      # Sorting can speed up the cls process
      indices = np.argsort(np.array(width_list))
  
      cls_res = [["", 0.0]] * img_num
      batch_num = 30
      for beg_img_no in range(0, img_num, batch_num):
          end_img_no = min(img_num, beg_img_no + batch_num)
          norm_img_batch = []
          max_wh_ratio = 0
          for ino in range(beg_img_no, end_img_no):
              h, w = img_list[indices[ino]].shape[0:2]
              wh_ratio = w * 1.0 / h
              max_wh_ratio = max(max_wh_ratio, wh_ratio)
          for ino in range(beg_img_no, end_img_no):
              norm_img = self.resize_norm_img_cls(
                  img_list[indices[ino]]
              )
              norm_img = norm_img[np.newaxis, :]
              norm_img_batch.append(norm_img)
          norm_img_batch = np.concatenate(norm_img_batch)
          norm_img_batch = norm_img_batch.copy()
  
          self.cls_input_tensor.copy_from_cpu(norm_img_batch)
          self.cls_predictor.run()
  
          prob_out = self.cls_output_tensors[0].copy_to_cpu()
          label_out = self.cls_output_tensors[1].copy_to_cpu()
          if len(label_out.shape) != 1:
              prob_out, label_out = label_out, prob_out
          label_list = ["0", "180"]
          for rno in range(len(label_out)):
              label_idx = label_out[rno]
              score = prob_out[rno][label_idx]
              label = label_list[label_idx]
              cls_res[indices[beg_img_no + rno]] = [label, score]
              if "180" in label and score > angle_classification_thresh:
                  img_list[indices[beg_img_no + rno]] = cv2.rotate(
                      img_list[indices[beg_img_no + rno]], 1
                  )
      return img_list, cls_res
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import ast
  import copy
  import math
  import os
  import time
  import cv2
  import numpy
  import paddle
  from chinese_ocr_db_crnn_server.character import CharacterOps
  from chinese_ocr_db_crnn_server.utils import base64_to_cv2
  from chinese_ocr_db_crnn_server.utils import draw_ocr
  from chinese_ocr_db_crnn_server.utils import get_image_ext
  from chinese_ocr_db_crnn_server.utils import sorted_boxes
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from PIL import Image
  import paddlehub
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
  from paddlehub.utils.log import logger
label_desc: Use image node_id 11 for calling the ChineseOCRDBCRNNServer obj's underlying member method code with example usage: obj._classify_text(image_list, angle_classification_thresh) and returns: img_list,  cls_res