def gen_function_call(func_attrs, indent="  ") -> str:
    """
    Generate function call.

    Returns
    -------
    str
        The function call string
    """
    backend_spec = CUDASpec()
    x = func_attrs["inputs"][0]
    dim_idxs = func_attrs["inputs"][1]
    y = func_attrs["outputs"][0]
    dim = func_attrs["dim"]

    dtype = backend_spec.dtype_to_backend_type(func_attrs["inputs"][0]._attrs["dtype"])

    dim_idxs_ptr = backend_spec.cast_to_ptr_template.render(
        name=dim_idxs._attrs["name"],
        dtype=backend_spec.index_type,
    )
    input_ptr = backend_spec.cast_to_ptr_template.render(
        name=x._attrs["name"],
        dtype=dtype,
    )

    output_ptr = backend_spec.cast_to_ptr_template.render(
        name=y._attrs["name"],
        dtype=dtype,
    )

    x_dims = ", ".join(dim._attrs["name"] for dim in x._attrs["shape"])
    dim_idxs_len = dim_idxs._attrs["shape"][0]._attrs["name"]

    return FUNC_CALL_TEMPLATE.render(
        indent=indent,
        index_type=backend_spec.index_type,
        x_dims=x_dims,
        input_type=dtype,
        func_name=func_attrs["name"],
        output=output_ptr,
        input=input_ptr,
        dim=dim,
        dim_idxs=dim_idxs_ptr,
        dim_idxs_len=dim_idxs_len,
    )
Generate function call.

Returns
-------
str
The function call string
python/aitemplate/backend/cuda/tensor/index_select.py