code: def test_pad_shape(self, input_param, input_data, expected_val):
      for p in TEST_NDARRAYS_ALL:
          if isinstance(p(0), torch.Tensor) and (
              "constant_values" in input_param
              or input_param["mode"] == "reflect"
          ):
              continue
          padcropper = ResizeWithPadOrCropd(**input_param)
          input_data_ = deepcopy(input_data)
          input_data_["img"] = p(input_data["img"])
          result = padcropper(input_data_)
          np.testing.assert_allclose(result["img"].shape, expected_val)
          inv = padcropper.inverse(result)
          for k in input_data_:
              self.assertTupleEqual(inv[k].shape, input_data_[k].shape)
  
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 1 for calling the TestResizeWithPadOrCropd obj's underlying member method code with example usage: obj.test_pad_shape(input_param, input_data, expected_val) without return types