code: def test_interpolation_gridwarper_correctness2(self):
      field = tf.constant(
          [
              [
                  [[[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,
      )
      grid = ResampledFieldGridWarperLayer(
          [2, 2, 3], [3, 3, 3], [2, 2, 2]
      )(field)
      expected_value = [
          [
              [
                  [[9.5], [9.75], [10]],
                  [[10.5], [10.75], [11]],
                  [[11.5], [11.75], [12]],
              ],
              [
                  [[11.5], [11.75], [12]],
                  [[12.5], [12.75], [13]],
                  [[13.5], [13.75], [14]],
              ],
              [
                  [[13.5], [13.75], [14]],
                  [[14.5], [14.75], [15]],
                  [[15.5], [15.75], [16]],
              ],
          ]
      ]
      self._test_correctness(
          input=self.get_3d_input1()[1:, :, :, :, :],
          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 5 for calling the ResamplerTest obj's underlying member method code with example usage: obj.test_interpolation_gridwarper_correctness2() without return types