code: def test_poly_iou(self):
      # test unsupported type
      with self.assertRaises(AssertionError):
          poly_iou([1], [2])
  
      points = [0, 0, 0, 1, 1, 1, 1, 0]
      points1 = [10, 20, 30, 40, 50, 60, 70, 80]
      points2 = [0, 0, 0, 0, 0, 0, 0, 0]  # Invalid polygon
      points3 = [0, 0, 0, 1, 1, 0, 1, 1]  # Self-intersected polygon
  
      poly = poly2shapely(points)
      poly1 = poly2shapely(points1)
      poly2 = poly2shapely(points2)
      poly3 = poly2shapely(points3)
  
      self.assertEqual(poly_iou(poly, poly1), 0)
  
      # test overlapping polygons
      self.assertEqual(poly_iou(poly, poly), 1)
  
      # test invalid polygons
      self.assertEqual(poly_iou(poly2, poly2), 0)
      self.assertEqual(poly_iou(poly3, poly3, zero_division=1), 1)
      self.assertEqual(poly_iou(poly2, poly3), 0)
  
imports: import unittest
  from itertools import chain, permutations
  import numpy
  import torch
  from shapely.geometry import MultiPolygon, Polygon
  from mmocr.utils import boundary_iou, crop_polygon, offset_polygon, poly2bbox, poly2shapely, poly_intersection, poly_iou, poly_make_valid, poly_union, polys2shapely, rescale_polygon, rescale_polygons, shapely2poly, sort_points, sort_vertex, sort_vertex8
label_desc: Use image node_id 11 for calling the TestPolygonUtils obj's underlying member method code with example usage: obj.test_poly_iou() without return types