def gen_function_call(func_attrs, backend_spec, indent="  "):
    """Function call generation

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

    Returns
    -------
    str
        Rendered function call
    """
    x = func_attrs["inputs"][0]
    rois = func_attrs["inputs"][1]
    xshape = x._attrs["shape"]
    y = func_attrs["outputs"][0]
    yshape = y._attrs["shape"]

    return FUNC_CALL_TEMPLATE.render(
        func_name=func_attrs["name"],
        in_ptr=x._attrs["name"],
        rois_ptr=rois._attrs["name"],
        out_ptr=y._attrs["name"],
        p_batch="&" + xshape[0]._attrs["name"],
        p_in_ch="&" + xshape[3]._attrs["name"],
        p_in_h="&" + xshape[1]._attrs["name"],
        p_in_w="&" + xshape[2]._attrs["name"],
        p_out_batch="&" + yshape[0]._attrs["name"],
        p_out_h="&" + yshape[1]._attrs["name"],
        p_out_w="&" + yshape[2]._attrs["name"],
        sampling_ratio=func_attrs["sampling_ratio"],
        spatial_scale=func_attrs["spatial_scale"],
        position_sensitive="true" if func_attrs["position_sensitive"] else "false",
        continuous_coordinate=(
            "true" if func_attrs["continuous_coordinate"] else "false"
        ),
        backend_spec=backend_spec,
        indent=indent,
    )
Function call generation

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

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