class_docstr: This class stores the segmentation masks for all objects in one image, in the form of polygons.
  
  Attributes:
      polygons: list[list[ndarray]]. Each ndarray is a float64 vector representing a polygon.
class_docstr_tok: ["This","class","stores","the","segmentation","masks","for","all","objects","in","one","image",",","in","the","form","of","polygons",".","Attributes",":","polygons",":","list","[","list","[","ndarray","]","]",".","Each","ndarray","is","a","float64","vector","representing","a","polygon","."]
docstr: Concatenates a list of PolygonMasks into a single PolygonMasks
  
  Arguments:
      polymasks_list (list[PolygonMasks])
  
  Returns:
      PolygonMasks: the concatenated PolygonMasks
docstr_tok: ["Concatenates","a","list","of","PolygonMasks","into","a","single","PolygonMasks","Arguments",":","polymasks_list","(","list","[","PolygonMasks","]",")","Returns",":","PolygonMasks",":","the","concatenated","PolygonMasks"]
code: def cat(polymasks_list: List["PolygonMasks"]) -> "PolygonMasks":
      """
      Concatenates a list of PolygonMasks into a single PolygonMasks
  
      Arguments:
          polymasks_list (list[PolygonMasks])
  
      Returns:
          PolygonMasks: the concatenated PolygonMasks
      """
      assert isinstance(polymasks_list, (list, tuple))
      assert len(polymasks_list) > 0
      assert all(
          isinstance(polymask, PolygonMasks)
          for polymask in polymasks_list
      )
  
      cat_polymasks = type(polymasks_list[0])(
          list(
              itertools.chain.from_iterable(
                  pm.polygons for pm in polymasks_list
              )
          )
      )
      return cat_polymasks
  
imports: import copy
  import itertools
  from typing import Any, Iterator, List, Union
  import numpy
  import torch
  import torchvision
  from .boxes import Boxes
label_desc: Use image node_id 12 for calling the PolygonMasks obj's underlying member method code with example usage: obj.cat(polymasks_list) and returns: cat_polymasks