def groupnorm_gen_function(func_attrs: Dict[str, Any], use_swish: bool = False) -> str:
    """Generate function body.

    Parameters
    ----------
    func_attrs : Dict
        Operation attributes.

    Returns
    -------
    str
        The rendered template of generated function body.
    """
    # N, H, W, C
    shapes = func_attrs["inputs"][0]._attrs["shape"]

    for dim_idx in (1, 2, 3):
        assert isinstance(
            shapes[dim_idx], IntImm
        ), f"groupnorm requires reduction dim {dim_idx=} to be static"

    return gen_function(
        func_attrs,
        SHAPE_EVAL_TEMPLATE,
        EXEC_TEMPLATE,
        EXTRA_HEADERS,
        EXTRA_CODE_TEMPLATE,
        get_func_signature,
        use_swish,
    )
Generate function body.

    Parameters
    ----------
    func_attrs : Dict
        Operation attributes.

    Returns
    -------
    str
        The rendered template of generated function body.
    
python/aitemplate/backend/rocm/normalization/groupnorm.py