code: def test_shapely2poly(self):
      polygon = Polygon(
          [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0]]
      )
      poly = np.array(
          [0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0]
      )
      self.assertTrue(poly2shapely(poly).equals(polygon))
      self.assertTrue(isinstance(shapely2poly(polygon), np.ndarray))
  
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 7 for calling the TestPolygonUtils obj's underlying member method code with example usage: obj.test_shapely2poly() without return types