code: def test_pending_ops(self, input_param, input_data, _expected_data):
      for p in TEST_NDARRAYS_ALL:
          # grid sample only support constant value to be zero
          if (
              "constant_values" in input_param
              and input_param["constant_values"] != 0
          ):
              continue
          padcropper = ResizeWithPadOrCropd(**input_param)
          input_data["img"] = p(input_data["img"])
          # non-lazy
          expected = padcropper(input_data)["img"]
          self.assertIsInstance(expected, MetaTensor)
          # lazy
          padcropper.lazy = True
          pending_result = padcropper(input_data)["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",
              "padding_mode": TESTS_PENDING_MODE[input_param["mode"]],
              "align_corners": True,
          }
          result = apply_pending(pending_result, overrides=overrides)[0]
          # compare
          assert_allclose(result, expected, rtol=1e-5)
  
file_path: MONAI/tests/test_resize_with_pad_or_cropd.py
imports: from __future__ import annotations
  import unittest
  from copy import deepcopy
  import numpy
  import torch
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import ResizeWithPadOrCropd
  from monai.transforms.lazy.functional import apply_pending
  from tests.test_resize_with_pad_or_crop import TESTS_PENDING_MODE
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose, pytorch_after
label_desc: Use image node_id 2 for calling the TestResizeWithPadOrCropd obj's underlying member method code with example usage: obj.test_pending_ops(input_param, input_data, _expected_data) without return types