code: def pad_test_kwargs(self, unchanged_slices, **input_param):
      for im_type in TEST_NDARRAYS_ALL:
          with self.subTest(im_type=im_type):
              for kwargs in (
                  {"value": 2},
                  {"constant_values": ((0, 0), (1, 1), (2, 2))},
              ):
                  with self.subTest(kwargs=kwargs):
                      im = im_type(
                          np.random.randint(-100, -10, size=(3, 8, 4))
                      )
                      padder = self.Padder(**input_param, **kwargs)
                      result = padder(im)
                      if isinstance(result, torch.Tensor):
                          result = result.cpu()
                      assert_allclose(
                          result[unchanged_slices], im, type_test=False
                      )
                      # we should have the same as the input plus some 2s (if value) or 1s and 2s (if constant_values)
                      if isinstance(im, torch.Tensor):
                          im = im.detach().cpu().numpy()
                      expected_vals = np.unique(im).tolist()
                      expected_vals += (
                          [2] if "value" in kwargs else [1, 2]
                      )
                      assert_allclose(
                          np.unique(result),
                          expected_vals,
                          type_test=False,
                      )
                      # check inverse
                      if isinstance(result, MetaTensor):
                          inv = padder.inverse(result)
                          assert_allclose(im, inv, type_test=False)
                          self.assertEqual(inv.applied_operations, [])
  
file_path: MONAI/tests/padders.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import Compose
  from monai.transforms.lazy.functional import apply_pending
  from monai.transforms.transform import MapTransform
  from monai.utils.enums import NumpyPadMode, PytorchPadMode
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 3 for calling the PadTest obj's underlying member method code with example usage: obj.pad_test_kwargs(unchanged_slices) without return types