def cse_separate(r, e):
 d = sift(e, (lambda w: (w.is_Equality and w.lhs.is_Symbol)))
 r = (r + [w.args for w in d[True]])
 e = d[False]
 return [reps_toposort(r), e]

def cse_separate ( r , e ) : d = sift ( e , ( lambda w : ( w . is_Equality and w . lhs . is_Symbol ) ) ) r = ( r + [ w . args for w in d [ True ] ] ) e = d [ False ] return [ reps_toposort ( r ) , e ]
move expressions that are in the form out of the expressions and sort them into the replacements using the reps_toposort .