(Shortest import: from brian2.codegen.optimisation import cancel_identical_terms)
from brian2.codegen.optimisation import cancel_identical_terms)
Cancel terms in a collection, e.g. a+b-a should be cancelled to b
Simply renders the nodes into expressions and removes whenever there is a common expression in primary and inverted.