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

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

    Returns
    -------
    str
        Rendered function call.
    """
    x = func_attrs["inputs"][0]
    outputs = func_attrs["outputs"]
    split_dim = func_attrs["split_dim"]
    num_splits = len(func_attrs["outputs"])

    output_names = ",\n      ".join([i._attrs["name"] for i in outputs])

    output_shape_defs = []
    output_shape_names = []
    for i in outputs:
        output_shape_name = "{}_shape".format(i._attrs["name"])
        if output_shape_name not in output_shape_names:
            dim_refs = ", ".join(
                ["&" + dim._attrs["name"] for dim in i._attrs["shape"]]
            )
            one_shape_def = OUTPUT_SHAPE_DEF_TEMPLATE.render(
                indent="      ",
                output_shape_name=output_shape_name,
                output_dim_refs=dim_refs,
                index_type=backend_spec.index_type,
            )
            output_shape_defs.append(one_shape_def)
        output_shape_names.append(output_shape_name)

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

    split_sizes = ", ".join([str(i) for i in func_attrs["split_sizes"]])

    output_masks_str = ", ".join(
        ["true" if mask is True else "false" for mask in func_attrs["output_masks"]]
    )

    return FUNC_CALL_TEMPLATE.render(
        indent=indent,
        outputs=output_names,
        output_shape_defs="".join(output_shape_defs),
        output_shapes=", ".join(output_shape_names),
        output_masks=output_masks_str,
        input_dims=x_dims,
        func_name=func_attrs["name"],
        input_name=x._attrs["name"],
        input_ptr=x._attrs["name"],
        split_dim=split_dim,
        real_num_splits=len(func_attrs["outputs"]),
        all_num_splits=len(func_attrs["output_masks"]),
        rank=len(x._attrs["shape"]),
        num_splits=num_splits,
        split_sizes=split_sizes,
        index_type=backend_spec.index_type,
    )
Generates function call.

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

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