code: def test_group_norm_mask(self):
      key = random.key(0)
      keys = random.split(key)
      x = random.normal(keys[0], (13, 3, 5, 7 * 11))
      m = random.choice(keys[1], 2, x.shape).astype(bool)
      m = m.at[..., :2].set(True)  # guarantee at least 2 elements
      x = jnp.where(m, x, jnp.nan)
  
      module = nn.GroupNorm(7, use_bias=False, use_scale=False)
      y, w = module.init_with_output(key, x, m)
  
      yr = y.reshape((13, 3, 5, 7, 11))
      mr = m.reshape((13, 3, 5, 7, 11))
  
      axes = list(range(1, x.ndim - 1)) + [-1]
  
      z = yr.mean(axes, where=mr)
      np.testing.assert_allclose(z, 0, atol=1e-4)
  
      z = yr.var(axes, where=mr)
      np.testing.assert_allclose(z, 1, atol=1e-4)
  
imports: import copy
  import functools
  from typing import Any
  import jax
  import jax.numpy
  import numpy
  import optax
  from absl.testing import absltest, parameterized
  from jax import random
  from flax import ids
  from flax import linen
  from flax.linen import fp8_ops
  from flax.training import train_state
label_desc: Use image node_id 3 for calling the NormalizationTest obj's underlying member method code with example usage: obj.test_group_norm_mask() without return types