code: def test_value_class(
      self, input_params, y_pred, y_gt, expected_value
  ):
      metric = PanopticQualityMetric(**input_params)
      metric(y_pred, y_gt)
      outputs = metric.aggregate()
      if isinstance(outputs, List):
          for output, value in zip(outputs, expected_value):
              np.testing.assert_allclose(
                  output.cpu().numpy(), np.asarray(value), atol=1e-4
              )
      else:
          np.testing.assert_allclose(
              outputs.cpu().numpy(),
              np.asarray(expected_value),
              atol=1e-4,
          )
  
file_path: MONAI/tests/test_compute_panoptic_quality.py
imports: from __future__ import annotations
  import unittest
  from typing import List
  import numpy
  import torch
  from parameterized import parameterized
  from monai.metrics import PanopticQualityMetric, compute_panoptic_quality
  from tests.utils import SkipIfNoModule
label_desc: Use image node_id 2 for calling the TestPanopticQualityMetric obj's underlying member method code with example usage: obj.test_value_class(input_params, y_pred, y_gt, expected_value) without return types