@staticmethod
def detect(patch, stmts_bef, stmts_aft, actions):
    modified = [a.frm() for a in actions['ModifyStatement'] if isinstance(a.frm(), cgum.statement.ExprStatement)]
    assigns = []
    for bef in modified:
        assigns += bef.collect((lambda n: isinstance(n, cgum.expression.Assignment)))
    assigns = [(frm, patch.was_is(frm)) for frm in assigns]
    actions['ModifyAssignment'] = [ModifyAssignment(frm, to) for (frm, to) in assigns if (not (to is None))]
@staticmethod
def detect(patch, stmts_bef, stmts_aft, actions):
    modified = [a.frm() for a in actions['ModifyStatement'] if isinstance(a.frm(), cgum.statement.ExprStatement)]
    assigns = []
    for bef in modified:
        assigns += bef.collect((lambda n: isinstance(n, cgum.expression.Assignment)))
    assigns = [(frm, patch.was_is(frm)) for frm in assigns]
    actions['ModifyAssignment'] = [ModifyAssignment(frm, to) for (frm, to) in assigns if (not (to is None))]