code: def test_calc_semantic_segmentation_confusion_shape(self):
      n_class = 30
      pred_labels = np.random.randint(0, n_class, size=(2, 3, 3))
      gt_labels = np.random.randint(-1, n_class, size=(2, 3, 3))
      confusion = calc_semantic_segmentation_confusion(
          pred_labels, gt_labels
      )
  
      size = np.max((pred_labels + 1, gt_labels + 1))
      self.assertEqual(confusion.shape, (size, size))
  
file_path: chainercv/tests/evaluations_tests/test_eval_semantic_segmentation.py
imports: from __future__ import division
  import unittest
  import numpy
  from chainercv.evaluations import calc_semantic_segmentation_confusion
  from chainercv.evaluations import calc_semantic_segmentation_iou
  from chainercv.evaluations import eval_semantic_segmentation
  from chainercv.utils import testing
label_desc: Use image node_id 2 for calling the TestCalcSemanticSegmentationConfusion obj's underlying member method code with example usage: obj.test_calc_semantic_segmentation_confusion_shape() without return types