code: def order_points_clockwise(self, pts):
      rect = np.zeros((4, 2), dtype="float32")
      s = pts.sum(axis=1)
      rect[0] = pts[np.argmin(s)]
      rect[2] = pts[np.argmax(s)]
      tmp = np.delete(pts, (np.argmin(s), np.argmax(s)), axis=0)
      diff = np.diff(np.array(tmp), axis=1)
      rect[1] = tmp[np.argmin(diff)]
      rect[3] = tmp[np.argmax(diff)]
      return rect
  
imports: import os
  import sys
  import cv2
  import numpy
  import time
  import sys
  import tools.infer.utility
  from ppocr.utils.logging import get_logger
  from ppocr.utils.utility import get_image_file_list, check_and_read
  from ppocr.data import create_operators, transform
  from ppocr.postprocess import build_post_process
  import json
label_desc: Use image node_id 2 for calling the TextDetector obj's underlying member method code with example usage: obj.order_points_clockwise(pts) and returns: rect