message model python syntax fixed