code: def test_shapely_annotation(self):
      # init shapely_annotation from coco segmentation
      segmentation = [[1, 1, 325, 125.2, 250, 200, 5, 200]]
      shapely_multipolygon = get_shapely_multipolygon(segmentation)
      shapely_annotation = ShapelyAnnotation.from_coco_segmentation(
          segmentation
      )
  
      # test conversion methods
      coco_segmentation = shapely_annotation.to_coco_segmentation()
      self.assertEqual(
          coco_segmentation,
          [[1, 1, 325, 125, 250, 200, 5, 200]],
      )
      opencv_contours = shapely_annotation.to_opencv_contours()
      self.assertEqual(
          opencv_contours,
          [
              [
                  [[1, 1]],
                  [[325, 125]],
                  [[250, 200]],
                  [[5, 200]],
                  [[1, 1]],
              ]
          ],
      )
      coco_bbox = shapely_annotation.to_xywh()
      self.assertEqual(
          coco_bbox,
          [1, 1, 324, 199],
      )
      voc_bbox = shapely_annotation.to_xyxy()
      self.assertEqual(
          voc_bbox,
          [1, 1, 325, 200],
      )
  
      # test properties
      self.assertEqual(
          shapely_annotation.area,
          int(shapely_multipolygon.area),
      )
      self.assertEqual(
          shapely_annotation.multipolygon,
          shapely_multipolygon,
      )
  
      # init shapely_annotation from coco bbox
      coco_bbox = [1, 1, 100, 100]
      shapely_polygon = get_shapely_box(
          x=coco_bbox[0],
          y=coco_bbox[1],
          width=coco_bbox[2],
          height=coco_bbox[3],
      )
      shapely_annotation = ShapelyAnnotation.from_coco_bbox(coco_bbox)
  
      # test conversion methods
      coco_segmentation = shapely_annotation.to_coco_segmentation()
      self.assertEqual(
          coco_segmentation,
          [[101, 1, 101, 101, 1, 101, 1, 1]],
      )
      opencv_contours = shapely_annotation.to_opencv_contours()
      self.assertEqual(
          opencv_contours,
          [
              [
                  [[101, 1]],
                  [[101, 101]],
                  [[1, 101]],
                  [[1, 1]],
                  [[101, 1]],
              ]
          ],
      )
      coco_bbox = shapely_annotation.to_xywh()
      self.assertEqual(
          coco_bbox,
          [1, 1, 100, 100],
      )
      voc_bbox = shapely_annotation.to_xyxy()
      self.assertEqual(
          voc_bbox,
          [1, 1, 101, 101],
      )
  
      # test properties
      self.assertEqual(
          shapely_annotation.area,
          MultiPolygon([shapely_polygon]).area,
      )
      self.assertEqual(
          shapely_annotation.multipolygon,
          MultiPolygon([shapely_polygon]),
      )
  
file_path: sahi/tests/test_shapelyutils.py
imports: import unittest
  from sahi.utils.shapely import MultiPolygon, ShapelyAnnotation, get_shapely_box, get_shapely_multipolygon
label_desc: Use image node_id 3 for calling the TestShapelyUtils obj's underlying member method code with example usage: obj.test_shapely_annotation() without return types