code: def group_rms(x, groups: int = 32, eps: float = 1e-5):
      B, C, H, W = x.shape
      _assert(C % groups == 0, "")
      x_dtype = x.dtype
      x = x.reshape(B, groups, C // groups, H, W)
      rms = (
          x.float()
          .square()
          .mean(dim=(2, 3, 4), keepdim=True)
          .add(eps)
          .sqrt_()
          .to(x_dtype)
      )
      return rms.expand(x.shape).reshape(B, C, H, W)
  
imports: from typing import Sequence, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from .create_act import create_act_layer
  from .trace_utils import _assert
label_desc: Use image node_id 7 for calling a global function with example usage: group_rms(x, groups, eps) and returns: rms