code: def get_3d_input1(self, as_tensor=True):
      test_array = np.array(
          [
              [[[1, 2, -1], [3, 4, -2]], [[5, 6, -3], [7, 8, -4]]],
              [
                  [[9, 10, -5], [11, 12, -6]],
                  [[13, 14, -7], [15, 16, -8]],
              ],
          ]
      )
      if as_tensor:
          test_array = tf.constant(test_array, dtype=tf.float32)
          return tf.expand_dims(test_array, 4)
      return np.expand_dims(test_array, 4).astype(np.float32)
  
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 2 for calling the ResamplerTest obj's underlying member method code with example usage: obj.get_3d_input1(as_tensor) and returns: np, tf