code: def expand_polygon(polygon):
      """
      对只有一个字符的框进行扩充
      """
      (x, y), (w, h), angle = cv2.minAreaRect(np.float32(polygon))
      if angle < -45:
          w, h = h, w
          angle += 90
      new_w = w + h
      box = ((x, y), (new_w, h), angle)
      points = cv2.boxPoints(box)
      return order_points_clockwise(points)
  
imports: import json
  import pathlib
  import time
  import os
  import glob
  import cv2
  import yaml
  from typing import Mapping
  import matplotlib.pyplot
  import numpy
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
label_desc: Use image node_id 18 for calling a global function with example usage: expand_polygon(polygon) and returns: order_points_clockwise