code: def test_interpolation_gridwarper_correctness(self):
      gridL = ResampledFieldGridWarperLayer(
          [2, 2, 3], [2, 2, 2], [2, 2, 2]
      )
      grid = gridL(
          tf.constant(
              [
                  [
                      [[[1, 1, 0], [1, 1, 1]], [[1, 0, 0], [1, 0, 1]]],
                      [[[0, 1, 0], [0, 1, 1]], [[0, 0, 0], [0, 0, 1]]],
                  ],
                  [
                      [
                          [[0, 0, 0.5], [0, 0, 1]],
                          [[0, 1, 0.5], [0, 1, 1]],
                      ],
                      [
                          [[1, 0, 0.5], [1, 0, 1]],
                          [[1, 1, 0.5], [1, 1, 1]],
                      ],
                  ],
              ],
              dtype=tf.float32,
          )
      )
      expected_value = [
          [[[[7], [8]], [[5], [6]]], [[[3], [4]], [[1], [2]]]],
          [
              [[[9.5], [10]], [[11.5], [12]]],
              [[[13.5], [14]], [[15.5], [16]]],
          ],
      ]
      self._test_correctness(
          input=self.get_3d_input1(),
          grid=grid,
          interpolation="LINEAR",
          boundary="REPLICATE",
          expected_value=expected_value,
      )
  
file_path: NiftyNet/tests/spatial_transformer_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.resampler import ResamplerLayer
  from niftynet.layer.spatial_transformer import ResampledFieldGridWarperLayer
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 4 for calling the ResamplerTest obj's underlying member method code with example usage: obj.test_interpolation_gridwarper_correctness() without return types