code: def _group_normalization(x, num_groups, scale, bias, epsilon=1e-5):
      # Assume channel is first dim
      assert x.shape[1] % num_groups == 0
      group_size = x.shape[1] // num_groups
      # Reshape to [N, group_size, C/group_size, H, W, ...]
      new_shape = [
          x.shape[0],
          num_groups,
          group_size,
          *list(x.shape[2:]),
      ]
      x_reshaped = x.reshape(new_shape)
      axes = tuple(range(2, len(new_shape)))
      mean = np.mean(x_reshaped, axis=axes, keepdims=True)
      var = np.var(x_reshaped, axis=axes, keepdims=True)
      dim_ones = (1,) * (len(new_shape) - 2)
      scale = scale.reshape(-1, *dim_ones)
      bias = bias.reshape(-1, *dim_ones)
      res = scale * (x_reshaped - mean) / np.sqrt(var + epsilon) + bias
      return res.reshape(x.shape)
  
file_path: onnx/onnx/backend/test/case/node/groupnormalization.py
imports: import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
label_desc: Use image node_id 1 for calling a global function with example usage: _group_normalization(x, num_groups, scale, bias, epsilon) and returns: res