code: def boundary_iou(
      src: List, target: List, zero_division: Union[int, float] = 0
  ) -> float:
      """Calculate the IOU between two boundaries.
  
      Args:
         src (list): Source boundary.
         target (list): Target boundary.
         zero_division (int or float): The return value when invalid
                                      boundary exists.
  
      Returns:
         float: The iou between two boundaries.
      """
      assert valid_boundary(src, False)
      assert valid_boundary(target, False)
      src_poly = poly2shapely(src)
      target_poly = poly2shapely(target)
  
      return poly_iou(
          src_poly, target_poly, zero_division=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 14 for calling a global function with example usage: boundary_iou(src, target, zero_division) and returns: poly_iou