class_docstr: This class stores the segmentation masks for all objects in one image, in
  the form of bitmaps.
  
  Attributes:
      tensor: bool Tensor of N,H,W, representing N instances in the image.
class_docstr_tok: ["This","class","stores","the","segmentation","masks","for","all","objects","in","one","image",",","in","the","form","of","bitmaps",".","Attributes",":","tensor",":","bool","Tensor","of","N",",","H",",","W",",","representing","N","instances","in","the","image","."]
docstr: Concatenates a list of BitMasks into a single BitMasks
  
  Arguments:
      bitmasks_list (list[BitMasks])
  
  Returns:
      BitMasks: the concatenated BitMasks
docstr_tok: ["Concatenates","a","list","of","BitMasks","into","a","single","BitMasks","Arguments",":","bitmasks_list","(","list","[","BitMasks","]",")","Returns",":","BitMasks",":","the","concatenated","BitMasks"]
code: def cat(bitmasks_list: List["BitMasks"]) -> "BitMasks":
      """
      Concatenates a list of BitMasks into a single BitMasks
  
      Arguments:
          bitmasks_list (list[BitMasks])
  
      Returns:
          BitMasks: the concatenated BitMasks
      """
      assert isinstance(bitmasks_list, (list, tuple))
      assert len(bitmasks_list) > 0
      assert all(
          isinstance(bitmask, BitMasks) for bitmask in bitmasks_list
      )
  
      cat_bitmasks = type(bitmasks_list[0])(
          torch.cat([bm.tensor for bm in bitmasks_list], dim=0)
      )
      return cat_bitmasks
  
imports: import copy
  import itertools
  import numpy
  from typing import Any, Iterator, List, Union
  import pycocotools.mask
  import torch
  from torch import device
  from detectron2.layers.roi_align import ROIAlign
  from detectron2.utils.memory import retry_if_cuda_oom
  from .boxes import Boxes
label_desc: Use image node_id 13 for calling the BitMasks obj's underlying member method code with example usage: obj.cat(bitmasks_list) and returns: cat_bitmasks