code: def test_compute(self, input_params, expected_avg):
      metric = PanopticQuality(**input_params)
  
      # set up engine
  
      def _val_func(engine, batch):
          pass
  
      engine = Engine(_val_func)
      metric.attach(engine=engine, name="panoptic_quality")
      # test input a list of channel-first tensor
      y_pred = [sample_1_pred, sample_2_pred]
      y = [sample_1_gt, sample_2_gt]
      engine.state.output = {"pred": y_pred, "label": y}
      engine.fire_event(Events.ITERATION_COMPLETED)
      y_pred = [sample_1_pred, sample_1_pred]
      y = [sample_1_gt, sample_1_gt]
      engine.state.output = {"pred": y_pred, "label": y}
      engine.fire_event(Events.ITERATION_COMPLETED)
  
      engine.fire_event(Events.EPOCH_COMPLETED)
      assert_allclose(
          engine.state.metrics["panoptic_quality"],
          expected_avg,
          atol=1e-4,
          rtol=1e-4,
          type_test=False,
      )
  
file_path: MONAI/tests/test_handler_panoptic_quality.py
imports: from __future__ import annotations
  import unittest
  import torch
  from ignite.engine import Engine, Events
  from parameterized import parameterized
  from monai.handlers import PanopticQuality, from_engine
  from tests.utils import SkipIfNoModule, assert_allclose
label_desc: Use image node_id 1 for calling the TestHandlerPanopticQuality obj's underlying member method code with example usage: obj.test_compute(input_params, expected_avg) without return types