code: def test_calc_semantic_segmentation_iou(self):
      c = np.random.randint(0, 100, size=(self.n_class, self.n_class))
      expected = np.array(
          [
              c[0, 0] / (c[0, 0] + c[0, 1] + c[1, 0]),
              c[1, 1] / (c[1, 1] + c[1, 0] + c[0, 1]),
          ]
      )
  
      iou = calc_semantic_segmentation_iou(c)
      np.testing.assert_equal(iou, expected)
  
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 1 for calling the TestCalcSemanticSegmentationIou obj's underlying member method code with example usage: obj.test_calc_semantic_segmentation_iou() without return types