code: def test_coco_instance_segmentation_dataset(self):
      assert_is_instance_segmentation_dataset(
          self.dataset,
          len(coco_instance_segmentation_label_names),
          n_example=10,
      )
  
      if self.return_area:
          for _ in range(10):
              i = np.random.randint(0, len(self.dataset))
              _, mask, _, area = self.dataset[i][:4]
              self.assertIsInstance(area, np.ndarray)
              self.assertEqual(area.dtype, np.float32)
              self.assertEqual(area.shape, (mask.shape[0],))
  
      if self.return_crowded:
          for _ in range(10):
              i = np.random.randint(0, len(self.dataset))
              example = self.dataset[i]
              if self.return_area:
                  crowded = example[4]
              else:
                  crowded = example[3]
              mask = example[1]
              self.assertIsInstance(crowded, np.ndarray)
              self.assertEqual(crowded.dtype, np.bool)
              self.assertEqual(crowded.shape, (mask.shape[0],))
  
              if not self.use_crowded:
                  np.testing.assert_equal(crowded, 0)
  
      if self.return_bbox:
          for _ in range(10):
              i = np.random.randint(0, len(self.dataset))
              example = self.dataset[i]
              bbox = example[-1]
              img, mask = example[:2]
              assert_is_bbox(bbox, img.shape[1:])
              self.assertEqual(len(bbox), len(mask))
  
file_path: chainercv/tests/datasets_tests/coco_tests/test_coco_instance_segmentation_dataset.py
imports: import unittest
  import numpy
  from chainer import testing
  from chainer.testing import attr
  from chainercv.datasets import coco_instance_segmentation_label_names
  from chainercv.datasets import COCOInstanceSegmentationDataset
  from chainercv.utils import assert_is_bbox
  from chainercv.utils import assert_is_instance_segmentation_dataset
label_desc: Use image node_id 2 for calling the TestCOCOInstanceSegmentationDataset obj's underlying member method code with example usage: obj.test_coco_instance_segmentation_dataset() without return types