code: def test_buffers(
      self, size_params, buffer_steps, buffer_dim, device_params
  ):
      def mult_two(patch, *args, **kwargs):
          return 2.0 * patch
  
      img_size, roi_size, overlap, sw_batch_size = size_params
      img_device, device, sw_device = device_params
      dtype = [torch.float, torch.double][
          roi_size[0] % 2
      ]  # test different input dtype
      mode = ["constant", "gaussian"][img_size[1] % 2]
      image = torch.randint(
          0, 255, size=img_size, dtype=dtype, device=img_device
      )
      sw = sliding_window_inference(
          image,
          roi_size,
          sw_batch_size,
          mult_two,
          overlap,
          mode=mode,
          sw_device=sw_device,
          device=device,
          buffer_steps=buffer_steps,
          buffer_dim=buffer_dim,
      )
      max_diff = torch.max(torch.abs(image.to(sw) - 0.5 * sw)).item()
      self.assertGreater(0.001, max_diff)
  
file_path: MONAI/tests/test_sliding_window_inference.py
imports: from __future__ import annotations
  import itertools
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.data.utils import list_data_collate
  from monai.inferers import SlidingWindowInferer, SlidingWindowInfererAdapt, sliding_window_inference
  from monai.utils import optional_import
  from tests.utils import TEST_TORCH_AND_META_TENSORS, skip_if_no_cuda, test_is_quick
label_desc: Use image node_id 1 for calling the TestSlidingWindowInference obj's underlying member method code with example usage: obj.test_buffers(size_params, buffer_steps, buffer_dim, device_params) and returns: unknown