code: def check_mask_voting(
      self, seg_prob, bbox, cls_prob, size, bg_label, roi_size
  ):
      xp = chainer.cuda.get_array_module(seg_prob)
      seg_prob, bbox, label, cls_prob = mask_voting(
          seg_prob,
          bbox,
          cls_prob,
          size,
          0.5,
          0.3,
          0.5,
          0.4,
          bg_label=bg_label,
      )
  
      n_roi = seg_prob.shape[0]
      self.assertIsInstance(seg_prob, xp.ndarray)
      self.assertEqual(seg_prob.shape[1:], (roi_size, roi_size))
      self.assertTrue(
          xp.all(xp.logical_and(seg_prob >= 0.0, seg_prob <= 1.0))
      )
  
      self.assertIsInstance(label, xp.ndarray)
      self.assertEqual(label.shape, (n_roi,))
  
      self.assertIsInstance(cls_prob, xp.ndarray)
      self.assertEqual(cls_prob.shape, (n_roi,))
  
      assert_is_bbox(bbox, size)
  
file_path: chainercv/tests/experimental_tests/links_tests/model_tests/fcis_tests/utils_tests/test_mask_voting.py
imports: import numpy
  import unittest
  import chainer
  from chainer import testing
  from chainercv.experimental.links.model.fcis.utils.mask_voting import mask_voting
  from chainercv.utils import assert_is_bbox
  from chainercv.utils import generate_random_bbox
label_desc: Use image node_id 2 for calling the TestMaskVoting obj's underlying member method code with example usage: obj.check_mask_voting(seg_prob, bbox, cls_prob, size, bg_label, roi_size) without return types