code: def poly_union(poly_det, poly_gt):
      """Calculate the union area between two polygon.
  
      Args:
          poly_det (Polygon): A polygon predicted by detector.
          poly_gt (Polygon): A gt polygon.
  
      Returns:
          union_area (float): The union area between two polygons.
      """
      assert isinstance(poly_det, Polygon)
      assert isinstance(poly_gt, Polygon)
  
      area_det = poly_det.area
      area_gt = poly_gt.area
      area_inters, _ = poly_intersection(poly_det, poly_gt)
      return area_det + area_gt - area_inters
  
file_path: PaddleOCR/ppocr/utils/poly_nms.py
imports: import numpy
  from shapely.geometry import Polygon
label_desc: Use image node_id 3 for calling a global function with example usage: poly_union(poly_det, poly_gt) and returns: unknown