code: def test_pending_ops(self, input_param, input_data, _expected_shape):
      for p in TEST_NDARRAYS_ALL:
          input_param_mod = self.convert_data_type(p, input_param)
          input_data_mod = self.convert_data_type(p, input_data)
          cropper = RandCropByPosNegLabeld(**input_param_mod)
          # non-lazy
          cropper.set_random_state(0)
          expected = cropper(input_data_mod)
          self.assertIsInstance(expected[0]["image"], MetaTensor)
          # lazy
          cropper.set_random_state(0)
          cropper.lazy = True
          pending_result = cropper(input_data_mod)
          for i, _pending_result in enumerate(pending_result):
              self.assertIsInstance(
                  _pending_result["image"], MetaTensor
              )
              assert_allclose(
                  _pending_result["image"].peek_pending_affine(),
                  expected[i]["image"].affine,
              )
              assert_allclose(
                  _pending_result["image"].peek_pending_shape(),
                  expected[i]["image"].shape[1:],
              )
              # only support nearest
              overrides = {"mode": "nearest", "align_corners": False}
              result_image = apply_pending(
                  _pending_result["image"], overrides=overrides
              )[0]
              result_extra = apply_pending(
                  _pending_result["extra"], overrides=overrides
              )[0]
              # compare
              assert_allclose(
                  result_image, expected[i]["image"], rtol=1e-5
              )
              assert_allclose(
                  result_extra, expected[i]["extra"], rtol=1e-5
              )
  
file_path: MONAI/tests/test_rand_crop_by_pos_neg_labeld.py
imports: from __future__ import annotations
  import unittest
  from copy import deepcopy
  import numpy
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import RandCropByPosNegLabeld
  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 TestRandCropByPosNegLabeld obj's underlying member method code with example usage: obj.test_pending_ops(input_param, input_data, _expected_shape) without return types