code: def test_bitmap_cat(self):
      # test invalid inputs
      with self.assertRaises(AssertionError):
          BitmapMasks.cat(BitmapMasks.random(4))
      with self.assertRaises(ValueError):
          BitmapMasks.cat([])
      with self.assertRaises(AssertionError):
          BitmapMasks.cat(
              [BitmapMasks.random(2), PolygonMasks.random(3)]
          )
  
      masks = [BitmapMasks.random(num_masks=3) for _ in range(5)]
      cat_mask = BitmapMasks.cat(masks)
      assert len(cat_mask) == 3 * 5
      for i, m in enumerate(masks):
          assert_allclose(m.masks, cat_mask.masks[i * 3 : (i + 1) * 3])
  
file_path: mmdetection/tests/test_structures/test_mask/test_mask_structures.py
imports: from unittest import TestCase
  import numpy
  from mmengine.testing import assert_allclose
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
label_desc: Use image node_id 3 for calling the TestMaskStructures obj's underlying member method code with example usage: obj.test_bitmap_cat() without return types