code: def test_value_shape(
      self, input_param, test_input, output, expected_shape
  ):
      result = AsDiscreted(**input_param)(test_input)
      assert_allclose(
          result["pred"], output["pred"], rtol=1e-3, type_test="tensor"
      )
      self.assertTupleEqual(result["pred"].shape, expected_shape)
      if "label" in result:
          assert_allclose(
              result["label"],
              output["label"],
              rtol=1e-3,
              type_test="tensor",
          )
          self.assertTupleEqual(result["label"].shape, expected_shape)
  
file_path: MONAI/tests/test_as_discreted.py
imports: from __future__ import annotations
  import unittest
  from parameterized import parameterized
  from monai.transforms import AsDiscreted
  from tests.utils import TEST_NDARRAYS, assert_allclose
label_desc: Use image node_id 1 for calling the TestAsDiscreted obj's underlying member method code with example usage: obj.test_value_shape(input_param, test_input, output, expected_shape) without return types