code: def test_pending_ops(
      self, input_param, image, _expected_data, align_corners
  ):
      crop_fn = CropForegroundd(**input_param)
      # non-lazy
      expected = crop_fn(image)["img"]
      self.assertIsInstance(expected, MetaTensor)
      # lazy
      crop_fn.lazy = True
      pending_result = crop_fn(image)["img"]
      self.assertIsInstance(pending_result, MetaTensor)
      assert_allclose(
          pending_result.peek_pending_affine(), expected.affine
      )
      assert_allclose(
          pending_result.peek_pending_shape(), expected.shape[1:]
      )
      # only support nearest
      overrides = {"mode": "nearest", "align_corners": align_corners}
      result = apply_pending(pending_result, overrides=overrides)[0]
      # compare
      assert_allclose(result, expected, rtol=1e-5)
  
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 3 for calling the TestCropForegroundd obj's underlying member method code with example usage: obj.test_pending_ops(input_param, image, _expected_data, align_corners) without return types