code: def test_constraints(self):
      grid_warper = AffineGridWarperLayer(
          source_shape=(3, 3),
          output_shape=(2, 4),
          constraints=AffineWarpConstraints.no_shear_2d(),
      )
      self.assertEqual(
          grid_warper.constraints.constraints,
          ((None, 0, None), (0, None, None)),
      )
  
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 3 for calling the AffineGridWarperLayerTest obj's underlying member method code with example usage: obj.test_constraints() without return types