<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def expression_ok(expression):
    '''return True if an expression is OK with current messages'''
    expression_ok = True
    fields = expression.split()
    for f in fields:
        try:
            if f.endswith(':2'):
                f = f[:-2]
            if mavutil.evaluate_expression(f, mestate.status.msgs) is None:
                expression_ok = False                        
        except Exception:
            expression_ok = False
            break
    return expression_ok