code: def trans_poly_to_bbox(poly):
      x1 = np.min([p[0] for p in poly])
      x2 = np.max([p[0] for p in poly])
      y1 = np.min([p[1] for p in poly])
      y2 = np.max([p[1] for p in poly])
      return [x1, y1, x2, y2]
  
file_path: PaddleOCR/ppstructure/kie/tools/trans_funsd_label.py
imports: import json
  import os
  import sys
  import cv2
  import numpy
  from copy import deepcopy
label_desc: Use image node_id 1 for calling a global function with example usage: trans_poly_to_bbox(poly) and returns: list