code: def test_value(self, input_data, expected_value):
      # include or ignore background
      input_data["include_background"] = True
      result = get_confusion_matrix(**input_data)
      assert_allclose(result, expected_value, atol=1e-4, rtol=1e-4)
      input_data["include_background"] = False
      result = get_confusion_matrix(**input_data)
      assert_allclose(
          result, expected_value[:, 1:, :], atol=1e-4, rtol=1e-4
      )
      np.testing.assert_equal(
          result.device, input_data["y_pred"].device
      )
  
file_path: MONAI/tests/test_compute_confusion_matrix.py
imports: from __future__ import annotations
  import unittest
  from typing import Any
  import numpy
  import torch
  from parameterized import parameterized
  from monai.metrics import ConfusionMatrixMetric, compute_confusion_matrix_metric, do_metric_reduction, get_confusion_matrix
  from tests.utils import assert_allclose
label_desc: Use image node_id 1 for calling the TestConfusionMatrix obj's underlying member method code with example usage: obj.test_value(input_data, expected_value) without return types