def gen_function(func_attrs, element_func=None, element_func_def=None):
    """Generates function body.

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        Stores the operation attributes.

    Returns
    -------
    str
        Rendered function body.
    """
    if _is_valid_fast_cat(func_attrs):
        return concatenate_fast.gen_function(
            func_attrs,
            concatenate_common.SRC_TEMPLATE,
            element_func=element_func,
            element_func_def=element_func_def,
        )
    else:
        return concatenate_common.gen_function(
            func_attrs=func_attrs,
            backend_spec=CUDASpec(),
            element_func=element_func,
            element_func_def=element_func_def,
        )
Generates function body.

Parameters
----------
func_attrs : Dict[str, Any]
Stores the operation attributes.

Returns
-------
str
Rendered function body.
python/aitemplate/backend/cuda/tensor/concatenate.py