code: def testBatchSizeAgnostic(self):
      layer = group_norm.GroupNorm(
          groups=5, create_scale=False, create_offset=False
      )
      inputs_spec = tf.TensorSpec([None, 3, 3, 10], dtype=tf.float32)
      params_spec = tf.TensorSpec([None], dtype=tf.float32)
      function_layer = tf.function(layer).get_concrete_function(
          inputs_spec, params_spec, params_spec
      )
  
      scale = tf.constant(0.5, shape=(10,))
      offset = tf.constant(2.0, shape=(10,))
  
      outputs = function_layer(tf.ones([2, 3, 3, 10]), scale, offset)
      self.assertEqual(outputs.shape, [2, 3, 3, 10])
      for x in np.nditer(outputs):
          self.assertEqual(x, 2.0)
  
      scale = tf.constant(0.5, shape=(10,))
      offset = tf.constant(2.0, shape=(10,))
  
      outputs = function_layer(tf.ones([3, 3, 3, 10]), scale, offset)
      self.assertEqual(outputs.shape, [3, 3, 3, 10])
      for x in np.nditer(outputs):
          self.assertEqual(x, 2.0)
  
imports: from absl.testing import parameterized
  import numpy
  from sonnet.src import group_norm
  from sonnet.src import initializers
  from sonnet.src import test_utils
  import tensorflow
label_desc: Use image node_id 20 for calling the GroupNormTest obj's underlying member method code with example usage: obj.testBatchSizeAgnostic() without return types