code: def test_lazy_error(
      self, input_param, image, _expected_data, align_corners
  ):
      with self.assertRaises(ValueError):
          crop_fn = CropForeground(**input_param)
          # lazy
          crop_fn.lazy = True
          pending_result = crop_fn(image)
          overrides = {
              "mode": "nearest",
              "align_corners": align_corners,
          }
          return apply_pending(pending_result, overrides=overrides)[0]
  
file_path: MONAI/tests/test_crop_foreground.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.config import USE_COMPILED
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import CropForeground
  from monai.transforms.lazy.functional import apply_pending
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 4 for calling the TestCropForeground obj's underlying member method code with example usage: obj.test_lazy_error(input_param, image, _expected_data, align_corners) and returns: apply_pending