code: def test_value(self, arguments, input_data, expected_data, _):
      cropper = CropForegroundd(**arguments)
      result = cropper(input_data)
      assert_allclose(result["img"], expected_data, type_test="tensor")
      if "label" in input_data and "img" in input_data:
          self.assertTupleEqual(
              result["img"].shape, result["label"].shape
          )
      inv = cropper.inverse(result)
      self.assertTupleEqual(inv["img"].shape, input_data["img"].shape)
      if "label" in input_data:
          self.assertTupleEqual(
              inv["label"].shape, input_data["label"].shape
          )
  
file_path: MONAI/tests/test_crop_foregroundd.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import CropForegroundd
  from monai.transforms.lazy.functional import apply_pending
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 1 for calling the TestCropForegroundd obj's underlying member method code with example usage: obj.test_value(arguments, input_data, expected_data, _) without return types