{{ var_name }} = (
    LocalMessageHandler()
    {% for message in messages %}
    .add_message(Message(id = "{{ message["id"] }}", action = {{ message["action"] }}, description = {{ message["description"] }}))
    {% endfor %}
)
{{ composer }}.use_local_message_handler({{ var_name }})
