code: 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_of 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
docs: return True if an expression is OK with current messages