code: def test_resampler_3d_replicate_nearest_correctness(self):
      test_grid = tf.constant(
          [
              [[0.25, 0.25, 0.25], [0.25, 0.75, 0.25]],
              [[0.75, 0.25, 0.25], [0.25, 0.25, 0.75]],
          ],
          dtype=tf.float32,
      )
      expected = [[[1, 101], [3, 103]], [[13, 113], [10, 110]]]
      self._test_correctness(
          input=self.get_3d_input2(),
          grid=test_grid,
          interpolation="NEAREST",
          boundary="REPLICATE",
          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 18 for calling the ResamplerTest obj's underlying member method code with example usage: obj.test_resampler_3d_replicate_nearest_correctness() without return types