code: def test_regular_grids(self):
      out = _create_affine_features([3, 3], [2], True)
      expected = [
          np.array(
              [-1.0, -1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0],
              dtype=np.float32,
          ),
          np.array(
              [-1.0, 0.0, 1.0, -1.0, 0.0, 1.0, -1.0, 0.0, 1.0],
              dtype=np.float32,
          ),
          np.array(
              [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
              dtype=np.float32,
          ),
      ]
      self.assertAllClose(expected, out)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import tensorflow
  from niftynet.layer.grid_warper import AffineGridWarperLayer
  from niftynet.layer.grid_warper import AffineWarpConstraints
  from niftynet.layer.grid_warper import _create_affine_features
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the GridWarperRelativeTest obj's underlying member method code with example usage: obj.test_regular_grids() without return types