code: def _check_decode(self):
      segms = [
          _random_array(
              self.link.xp,
              (
                  1,
                  self.n_class,
                  self.link.segm_size,
                  self.link.segm_size,
              ),
          ),
          _random_array(
              self.link.xp,
              (
                  2,
                  self.n_class,
                  self.link.segm_size,
                  self.link.segm_size,
              ),
          ),
          _random_array(
              self.link.xp,
              (
                  1,
                  self.n_class,
                  self.link.segm_size,
                  self.link.segm_size,
              ),
          ),
      ]
      bboxes = [
          self.link.xp.array(((4, 1, 6, 3),), dtype=np.float32),
          self.link.xp.array(
              ((0, 1, 2, 3), (5, 4, 10, 6)), dtype=np.float32
          ),
          self.link.xp.array(((10, 4, 12, 10),), dtype=np.float32),
      ]
      labels = [
          self.link.xp.random.randint(
              0, self.n_class - 1, size=(1,), dtype=np.int32
          ),
          self.link.xp.random.randint(
              0, self.n_class - 1, size=(2,), dtype=np.int32
          ),
          self.link.xp.random.randint(
              0, self.n_class - 1, size=(1,), dtype=np.int32
          ),
      ]
  
      sizes = [(56, 56), (48, 48), (72, 72)]
      masks = self.link.decode(segms, bboxes, labels, sizes)
  
      self.assertEqual(len(masks), 3)
      for n in range(3):
          self.assertIsInstance(masks[n], self.link.xp.ndarray)
  
          self.assertEqual(masks[n].shape[0], labels[n].shape[0])
          self.assertEqual(masks[n].shape[1:], sizes[n])
  
imports: from __future__ import division
  import numpy
  import unittest
  import chainer
  from chainer import testing
  from chainer.testing import attr
  from chainercv.links.model.fpn import mask_head_loss_post
  from chainercv.links.model.fpn import mask_head_loss_pre
  from chainercv.links.model.fpn import MaskHead
  from chainercv.utils import mask_to_bbox
label_desc: Use image node_id 8 for calling the TestMaskHead obj's underlying member method code with example usage: obj._check_decode() without return types