code: def test_resampler_2d_replicate_linear_correctness(self):
      test_grid = tf.constant(
          [[[0.25, 0.25], [0.25, 0.78]], [[0.62, 0.25], [0.25, 0.28]]],
          dtype=tf.float32,
      )
      expected = [
          [[2.5, 3.5, -1.75], [3.56, 4.56, -2.28]],
          [[11.98, 12.98, -6.49], [10.56, 11.56, -5.78]],
      ]
      self._test_correctness(
          input=self.get_2d_input(),
          grid=test_grid,
          interpolation="LINEAR",
          boundary="ZERO",
          expected_value=expected,
      )
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import tensorflow
  import tensorflow.test
  from niftynet.contrib.layer.resampler_optional_niftyreg import ResamplerOptionalNiftyRegLayer
  from tests.niftynet_testcase import NiftyNetTestCase
  import niftynet.contrib.layer.resampler_optional_niftyreg
label_desc: Use image node_id 6 for calling the ResamplerTest obj's underlying member method code with example usage: obj.test_resampler_2d_replicate_linear_correctness() without return types