docstr: Returns boolean mask as coco segmentation:
  [
      [x1, y1, x2, y2, x3, y3, ...],
      [x1, y1, x2, y2, x3, y3, ...],
      ...
  ]
docstr_tok: ["Returns","boolean","mask","as","coco","segmentation",":","[","[","x1",",","y1",",","x2",",","y2",",","x3",",","y3",",","...","]",",","[","x1",",","y1",",","x2",",","y2",",","x3",",","y3",",","...","]",",","...","]"]
code: def to_coco_segmentation(self):
      """
      Returns boolean mask as coco segmentation:
      [
          [x1, y1, x2, y2, x3, y3, ...],
          [x1, y1, x2, y2, x3, y3, ...],
          ...
      ]
      """
      coco_segmentation = get_coco_segmentation_from_bool_mask(
          self.bool_mask
      )
      return coco_segmentation
  
imports: import copy
  from typing import Dict, List, Optional
  import numpy
  from sahi.utils.coco import CocoAnnotation, CocoPrediction
  from sahi.utils.cv import get_bbox_from_bool_mask, get_bool_mask_from_coco_segmentation, get_coco_segmentation_from_bool_mask
  from sahi.utils.shapely import ShapelyAnnotation
label_desc: Use image node_id 11 for calling the Mask obj's underlying member method code with example usage: obj.to_coco_segmentation() and returns: coco_segmentation