code: def test_rank_changes(self):
      layer = group_norm.GroupNorm(
          groups=5, create_scale=False, create_offset=False
      )
  
      inputs = jnp.ones([2, 3, 3, 5])
      scale = constant(0.5, shape=(5,))
      offset = constant(2.0, shape=(5,))
  
      layer(inputs, scale, offset)
  
      with self.assertRaisesRegex(
          ValueError,
          "The rank of the inputs cannot change between calls, the original",
      ):
          layer(jnp.ones([2, 3, 3, 4, 5]), scale, offset)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from haiku._src import group_norm
  from haiku._src import initializers
  from haiku._src import test_utils
  import jax.numpy
  import numpy
label_desc: Use image node_id 17 for calling the GroupNormTest obj's underlying member method code with example usage: obj.test_rank_changes() without return types