code: def test(self):
      H = 80
      W = 90
      n_inst = 10
  
      mask = np.zeros((n_inst, H, W), dtype=np.bool)
      bbox = generate_random_bbox(n_inst, (H, W), 10, 30).astype(
          np.int32
      )
      for i, bb in enumerate(bbox):
          y_min, x_min, y_max, x_max = bb
          m = np.random.randint(
              0, 2, size=(y_max - y_min, x_max - x_min)
          )
          m[5, 5] = 1  # At least one element is one
          mask[i, y_min:y_max, x_min:x_max] = m
      bbox = mask_to_bbox(mask)
      size = H * 2
      out_H = size
      out_W = W * 2
      out_mask = scale_mask(mask, bbox, size)
  
      expected = resize(
          mask.astype(np.float32),
          (out_H, out_W),
          interpolation=PIL.Image.NEAREST,
      ).astype(np.bool)
      np.testing.assert_equal(out_mask, expected)
  
file_path: chainercv/tests/utils_tests/mask_tests/test_scale_mask.py
imports: from __future__ import division
  import unittest
  import numpy
  import PIL.Image
  from chainer.backends import cuda
  from chainer import testing
  from chainer.testing import attr
  from chainercv.transforms import resize
  from chainercv.utils import generate_random_bbox
  from chainercv.utils import mask_to_bbox
  from chainercv.utils import scale_mask
label_desc: Use image node_id 1 for calling the TestScaleMaskCompareResize obj's underlying member method code with example usage: obj.test() without return types