Currently in OptimizationRule, there're only collapsable_predecessors adding/removing and node replacing functions to handle graph mutation. However, some new rules may need to replace a piece of subgraph by adding/removing nodes and edges. Thus we need a more universal function to do this work.
Currently in OptimizationRule, there're only collapsable_predecessors adding/removing and node replacing functions to handle graph mutation. However, some new rules may need to replace a piece of subgraph by adding/removing nodes and edges. Thus we need a more universal function to do this work.