def METHOD_NAME(
    message_text: Text,
    entities: List[Dict[Text, Any]],
):
    message = Message.build(message_text, "dummy_intent", entities=entities)
    with pytest.raises(ValueError):
        TrainingDataWriter.generate_message(message)