def copy_constr(constr, func):
 expr = func(constr.expr)
 return type(constr)(expr, constr.constr_id, constr.size)

def copy_constr ( constr , func ) : expr = func ( constr . expr ) return type ( constr ) ( expr , constr . constr_id , constr . size )
creates a copy of the constraint modified according to func .