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 = RandCropByPosNegLabel(**input_param_mod)
          # non-lazy
          cropper.set_random_state(0)
          expected = cropper(**input_data_mod)
          self.assertIsInstance(expected[0], 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, MetaTensor)
              assert_allclose(
                  _pending_result.peek_pending_affine(),
                  expected[i].affine,
              )
              assert_allclose(
                  _pending_result.peek_pending_shape(),
                  expected[i].shape[1:],
              )
              # only support nearest
              result = apply_pending(
                  _pending_result,
                  overrides={"mode": "nearest", "align_corners": False},
              )[0]
              # compare
              assert_allclose(result, expected[i], rtol=1e-5)
  
file_path: MONAI/tests/test_rand_crop_by_pos_neg_label.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 RandCropByPosNegLabel
  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 TestRandCropByPosNegLabel obj's underlying member method code with example usage: obj.test_pending_ops(input_param, input_data, _expected_shape) without return types