code: def test_value_class(self, input_data, expected_value):
      loss_fn = input_data["loss_class"](**input_data["loss_kwargs"])
      loss_metric = LossMetric(
          loss_fn=loss_fn,
          reduction=input_data["reduction"],
          get_not_nans=input_data["get_not_nans"],
      )
  
      loss_metric(
          y_pred=input_data.get("y_pred"), y=input_data.get("y")
      )
      loss_metric(
          y_pred=input_data.get("y_pred"), y=input_data.get("y")
      )
      result = loss_metric.aggregate()
      np.testing.assert_allclose(
          result.cpu().numpy(), expected_value, atol=1e-4
      )
      loss_metric.reset()
      result = loss_metric.aggregate()
      np.testing.assert_allclose(result.cpu().numpy(), 0.0, atol=1e-4)
  
file_path: MONAI/tests/test_loss_metric.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.losses import DiceLoss
  from monai.metrics import LossMetric
label_desc: Use image node_id 1 for calling the TestComputeLossMetric obj's underlying member method code with example usage: obj.test_value_class(input_data, expected_value) without return types