code: def crop_test_pending_ops(
      self, input_param, input_shape, align_corners=False
  ):
      crop_fn = self.Cropper(**input_param)
      data = self.get_arr(input_shape)
      is_map = isinstance(crop_fn, MapTransform)
      im = MetaTensor(
          data, meta={"a": "b", "affine": np.eye(len(input_shape))}
      )
      input_data = {"img": im} if is_map else im
      # non-lazy
      result_non_lazy = crop_fn(input_data)
      expected = result_non_lazy["img"] if is_map else result_non_lazy
      self.assertIsInstance(expected, MetaTensor)
      # lazy
      crop_fn.lazy = True
      pending_result = crop_fn(input_data)
      pending_result = (
          pending_result["img"] if is_map else pending_result
      )
      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)
      if isinstance(result, MetaTensor) and not isinstance(
          crop_fn, MapTransform
      ):
          crop_fn.lazy = False
          inverted = crop_fn.inverse(result)
          self.assertTrue(
              (not inverted.applied_operations)
              and (not inverted.pending_operations)
          )
          self.assertEqual(inverted.shape, im.shape)
  
file_path: MONAI/tests/croppers.py
imports: from __future__ import annotations
  import unittest
  from copy import deepcopy
  import numpy
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import Randomizable
  from monai.transforms.lazy.functional import apply_pending
  from monai.transforms.transform import MapTransform
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 5 for calling the CropTest obj's underlying member method code with example usage: obj.crop_test_pending_ops(input_param, input_shape, align_corners) without return types