code: def _check_head_loss_post(self, xp):
      B = 2
      segms = chainer.Variable(_random_array(xp, (20, 81, 28, 28)))
      mask_roi_indices = [
          xp.random.randint(0, B, size=5).astype(np.int32),
          xp.random.randint(0, B, size=7).astype(np.int32),
          xp.random.randint(0, B, size=8).astype(np.int32),
      ]
      gt_segms = [
          _random_array(xp, (5, 28, 28)),
          _random_array(xp, (7, 28, 28)),
          _random_array(xp, (8, 28, 28)),
      ]
      gt_mask_labels = [
          xp.random.randint(0, 80, size=5).astype(np.int32),
          xp.random.randint(0, 80, size=7).astype(np.int32),
          xp.random.randint(0, 80, size=8).astype(np.int32),
      ]
  
      mask_head_loss = mask_head_loss_post(
          segms, mask_roi_indices, gt_segms, gt_mask_labels, B
      )
  
      self.assertIsInstance(mask_head_loss, chainer.Variable)
      self.assertIsInstance(mask_head_loss.array, xp.ndarray)
      self.assertEqual(mask_head_loss.shape, ())
  
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 4 for calling the TestMaskHeadLoss obj's underlying member method code with example usage: obj._check_head_loss_post(xp) without return types