def squeeze_gen_function(func_attrs, shape_eval_template):
    """Generate the function body squeeze/unsqueeze.

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        The _attrs dict from the original op.
    shape_eval_template : jinja2.Template
        The template that implements the logic for writing to dynamic shapes.
    """
    func_name = "ait_" + func_attrs["name"]
    out_dim_to_in = func_attrs["out_dim_to_in"]

    input_ndim = len(func_attrs["inputs"][0]._attrs["shape"])
    output_ndim = len(func_attrs["outputs"][0]._attrs["shape"])

    input_args = INPUT_ARGS_TEMPLATE.render(input_ndim=input_ndim)
    output_args = OUTPUT_ARGS_TEMPLATE.render(output_ndim=output_ndim)

    shape_functions = shape_eval_template.render(
        indent="  ",
        dtype="int64_t ",
        input_ndim=input_ndim,
        output_ndim=output_ndim,
        out_dim_to_in=out_dim_to_in,
    )

    return SRC_TEMPLATE.render(
        function_name=func_name,
        shape_functions=shape_functions.strip(),
        input_args=input_args.strip(),
        output_args=output_args.strip(),
    )
Generate the function body squeeze/unsqueeze.

Parameters
----------
func_attrs : Dict[str, Any]
The _attrs dict from the original op.
shape_eval_template : jinja2.Template
The template that implements the logic for writing to dynamic shapes.
python/aitemplate/backend/cuda/view_ops/view_ops.py