code: def test_reduction(self):
      sur_metric = SurfaceDistance(
          include_background=True, reduction="mean_channel"
      )
  
      def _val_func(engine, batch):
          pass
  
      engine = Engine(_val_func)
      sur_metric.attach(engine, "surface_distance")
  
      y_pred, y = TEST_SAMPLE_1
      sur_metric.update([y_pred, y])
      y_pred, y = TEST_SAMPLE_2
      sur_metric.update([y_pred, y])
      assert_allclose(
          sur_metric.compute().float(),
          torch.tensor([4.1713, 0.0000]),
          atol=1e-4,
          rtol=1e-4,
          type_test=False,
      )
  
file_path: MONAI/tests/test_handler_surface_distance.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from ignite.engine import Engine
  from monai.handlers import SurfaceDistance
  from tests.utils import assert_allclose
label_desc: Use image node_id 3 for calling the TestHandlerSurfaceDistance obj's underlying member method code with example usage: obj.test_reduction() without return types