def gen_function_call(func_attrs: Dict[str, Any], backend_spec, indent="  ") -> str:
    """Generates function call.

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

    Returns
    -------
    str
        Rendered function call.
    """
    assert len(func_attrs["outputs"]) == 2
    assert len(func_attrs["inputs"]) == 1

    output_value_name = func_attrs["outputs"][0]._attrs["name"]
    output_index_name = FUNC_CALL_INT64_PARAM_TEMPLATE.render(
        name=func_attrs["outputs"][1]._attrs["name"]
    )
    input_name = func_attrs["inputs"][0]._attrs["name"]

    x = func_attrs["inputs"][0]
    xshape = x._attrs["shape"]

    elem_cnt = 1
    for shape in xshape:
        elem_cnt *= shape._attrs["values"][0]
    instance_size = xshape[-1]._attrs["values"][0]
    instance_num = elem_cnt // instance_size

    return FUNC_CALL_TEMPLATE.render(
        func_name=func_attrs["name"],
        output_index=output_index_name,
        output_value=output_value_name,
        input=input_name,
        elem_cnt=elem_cnt,
        instance_size=instance_size,
        instance_num=instance_num,
        top_k=func_attrs["topK"],
        indent=indent,
    )
Generates function call.

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

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