def _remove_exceptions(gm: torch.fx.GraphModule) -> bool:
    """
    Unconditionally removes all call_modules to ConditionalExceptionWrappers
    found in GraphModule gm. Returns whether the graph is modified.
    """
    changed = False
    for node in reversed(gm.graph.nodes):
        if node.op == "call_module" and (
            isinstance(gm.get_submodule(node.target), ConditionalExceptionWrapper)
            or isinstance(
                gm.get_submodule(node.target), ConditionalExceptionBoolCondWrapper
            )
        ):
            gm.graph.erase_node(node)
            changed = True
    return changed

    Unconditionally removes all call_modules to ConditionalExceptionWrappers
    found in GraphModule gm. Returns whether the graph is modified.
    
fx2ait/fx2ait/acc_tracer/acc_tracer.py