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/ppocr/utils/visual.py
imports: import cv2
  import os
  import numpy
  from PIL import Image, ImageDraw, ImageFont
label_desc: Use image node_id 3 for calling a global function with example usage: trans_poly_to_bbox(poly) and returns: list