def var_gen_function(func_attrs) -> str:
    """the registered function for generating var kernel and all of
    its auxiliary functions

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        holds the attributes of this var op

    Returns
    -------
    str
        returns the rendered code for the complete implementation of this var op
    """
    bessel = "true" if func_attrs["unbiased"] else "false"
    backend_spec = CUDASpec()
    output_type = func_attrs["outputs"][0]._attrs["dtype"]
    elem_output_type = backend_spec.dtype_to_lib_type(output_type)

    acc_type = "float"
    if Target.current()._kwargs.get("use_fp16_acc", False) and output_type == "float16":
        acc_type = elem_output_type
    welford_type = f"WelfordData<{acc_type}, {bessel}>"
    return reduce_3d.gen_function(
        func_attrs,
        "cutlass::welford_op",
        reduce_3d.DEFAULT_PROLOGUE_TEMPLATE,
        reduce_3d.DEFAULT_EPILOGUE_SCALAR_TEMPLATE,
        EXTRA_CODE_TEMPLATE.render(acc_type=acc_type),
        accumulation_type=welford_type,
    )
the registered function for generating var kernel and all of
its auxiliary functions

Parameters
----------
func_attrs : Dict[str, Any]
holds the attributes of this var op

Returns
-------
str
returns the rendered code for the complete implementation of this var op
python/aitemplate/backend/cuda/reduce/var.py