class_docstr: Creates ShapelyAnnotation (as shapely MultiPolygon).
  Can convert this instance annotation to various formats.
docstr: Init ShapelyAnnotation from coco segmentation.
  
  segmentation : List[List]
      [[1, 1, 325, 125, 250, 200, 5, 200]]
  slice_bbox (List[int]): [xmin, ymin, width, height]
      Should have the same format as the output of the get_bbox_from_shapely function.
      Is used to calculate sliced coco coordinates.
docstr_tok: ["Init","ShapelyAnnotation","from","coco","segmentation",".","segmentation",":","List","[","List","]","[","[","1",",","1",",","325",",","125",",","250",",","200",",","5",",","200","]","]","slice_bbox","(","List","[","int","]",")",":","[","xmin",",","ymin",",","width",",","height","]","Should","have","the","same","format","as","the","output","of","the","get_bbox_from_shapely","function",".","Is","used","to","calculate","sliced","coco","coordinates","."]
code: def from_coco_segmentation(cls, segmentation, slice_bbox=None):
      """
      Init ShapelyAnnotation from coco segmentation.
  
      segmentation : List[List]
          [[1, 1, 325, 125, 250, 200, 5, 200]]
      slice_bbox (List[int]): [xmin, ymin, width, height]
          Should have the same format as the output of the get_bbox_from_shapely function.
          Is used to calculate sliced coco coordinates.
      """
      shapely_multipolygon = get_shapely_multipolygon(segmentation)
      return cls(
          multipolygon=shapely_multipolygon, slice_bbox=slice_bbox
      )
  
imports: from typing import List
  from shapely.geometry import CAP_STYLE, JOIN_STYLE, MultiPolygon, Polygon, box
label_desc: Use image node_id 1 for calling the ShapelyAnnotation obj's underlying member method code with example usage: obj.from_coco_segmentation(cls, segmentation, slice_bbox) and returns: cls