code: def poly_iou(
      poly_a: Polygon, poly_b: Polygon, zero_division: float = 0.0
  ) -> float:
      """Calculate the IOU between two polygons.
  
      Args:
          poly_a (Polygon): Polygon a.
          poly_b (Polygon): Polygon b.
          zero_division (float): The return value when invalid polygon exists.
  
      Returns:
          float: The IoU between two polygons.
      """
      assert isinstance(poly_a, Polygon)
      assert isinstance(poly_b, Polygon)
      area_inters = poly_intersection(poly_a, poly_b)
      area_union = poly_union(poly_a, poly_b)
      return (
          area_inters / area_union if area_union != 0 else zero_division
      )
  
imports: import math
  import operator
  from functools import reduce
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import pyclipper
  import shapely
  from mmengine.utils import is_list_of
  from shapely.geometry import MultiPolygon, Polygon
  from mmocr.utils import bbox2poly, valid_boundary
  from mmocr.utils.check_argument import is_2dlist
  from mmocr.utils.typing_utils import ArrayLike
label_desc: Use image node_id 11 for calling a global function with example usage: poly_iou(poly_a, poly_b, zero_division) and returns: unknown