def gen_function_call(func_attrs, backend_spec, indent="  "):
    """Generates function call.

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        Stores the operation attributes.
    backend_spec: dataclass
        Backend specification.
    indent : str, optional
        Indent for template, by default "  ".

    Returns
    -------
    str
        Rendered function call.
    """
    slice_ops = func_attrs["slice_ops"]
    assert len(slice_ops) >= 1
    start_indices = [op._attrs["start_indices"] for op in slice_ops]
    end_indices = [op._attrs["end_indices"] for op in slice_ops]

    y = func_attrs["outputs"][0]
    dims = [d._attrs["values"][0] for d in y._attrs["shape"]]
    scatter_dim = func_attrs["scatter_dim"]
    output_shape_dims = []
    output_shape_dim_defs = []
    new_dims = dims[:scatter_dim]
    remaining_dim = functools.reduce(lambda a, b: a * b, dims[scatter_dim:])
    new_dims.append(remaining_dim)
    for i, dim in enumerate(new_dims):
        dim_name = "output_dim_{}".format(i)
        output_shape_dims.append(dim_name)
        dim_def = OUTPUT_DIM_DEF_TEMPLATE.render(
            indent=indent, dim_name=dim_name, dim_value=dim
        )
        output_shape_dim_defs.append(dim_def)
    y_dim_refs = ", ".join(["&" + dim for dim in output_shape_dims])
    output_shape_def = OUTPUT_SHAPE_DEF_TEMPLATE.render(
        indent=indent,
        dim_defs="".join(output_shape_dim_defs),
        output_name=y._attrs["name"],
        output_dim_refs=y_dim_refs,
    )

    return slice_common.gen_function_call(
        backend_spec,
        func_attrs["name"],
        func_attrs["inputs"],
        func_attrs["outputs"],
        start_indices,
        end_indices,
        dim=scatter_dim,
        indent=indent,
        output_shape_def=output_shape_def,
    )
Generates function call.

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        Stores the operation attributes.
    backend_spec: dataclass
        Backend specification.
    indent : str, optional
        Indent for template, by default "  ".

    Returns
    -------
    str
        Rendered function call.
    
python/aitemplate/backend/common/tensor/slice_reshape_scatter_common.py