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

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        Stores the operation attributes.
    element_func: str
        Attributes for ease of tanh concatenate fusion.

    Returns
    -------
    str
        Rendered function body.
    """
    # TODO: consider to profile elems_per_thread
    return slice_reshape_scatter_common.gen_function(
        func_attrs, CUDASpec(), TANH_DEF, element_func, EXTRA_HEADER_TEMPLATE
    )
Generates function body.

Parameters
----------
func_attrs : Dict[str, Any]
Stores the operation attributes.
element_func: str
Attributes for ease of tanh concatenate fusion.

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