code: def test_value_class(self, input_data, expected_value):
      # same test as for compute_meandice
      vals = {}
      vals["y_pred"] = input_data.pop("y_pred")
      vals["y"] = input_data.pop("y")
      generalized_dice_score = GeneralizedDiceScore(**input_data)
      generalized_dice_score(**vals)
      result = generalized_dice_score.aggregate(reduction="none")
      np.testing.assert_allclose(
          result.cpu().numpy(), expected_value, atol=1e-4
      )
  
file_path: MONAI/tests/test_compute_generalized_dice.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.metrics import GeneralizedDiceScore, compute_generalized_dice
label_desc: Use image node_id 4 for calling the TestComputeGeneralizedDiceScore obj's underlying member method code with example usage: obj.test_value_class(input_data, expected_value) without return types