def gen_function_call(func_attrs, indent="  ") -> str:
    """a common function for generating a call to a reduce-family function

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        holds attributes of this reduce op
    indent : str, optional
        indent for each line of the function call code (default "  ")

    Returns
    -------
    str
        returns rendered code for invoking the reduce op
    """
    x = func_attrs["inputs"][0]
    y = func_attrs["outputs"][0]
    axes = func_attrs["reduction_axes"]
    if not len(axes) == 1:
        raise NotImplementedError("Multiple reduction axes are not supported yet")

    x_shape = x._attrs["shape"]
    x_dims = ", ".join([dim._attrs["name"] for dim in x_shape])
    y_shape = func_attrs["output_accessors"][0].original_shapes
    y_dim_refs = ", ".join(["&" + dim._attrs["name"] for dim in y_shape])
    keep_dim = "true" if func_attrs["keepdim"] else "false"

    return FUNC_CALL_TEMPLATE.render(
        indent=indent,
        func_name=func_attrs["name"],
        output_name=y._attrs["name"],
        input_name=x._attrs["name"],
        input_dims=x_dims,
        output_dim_refs=y_dim_refs,
        reduction_axis=axes[0],
        rank=str(len(x_shape)),
        keep_dim=keep_dim,
    )
a common function for generating a call to a reduce-family function

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        holds attributes of this reduce op
    indent : str, optional
        indent for each line of the function call code (default "  ")

    Returns
    -------
    str
        returns rendered code for invoking the reduce op
    
python/aitemplate/backend/cuda/reduce/reduce_3d.py