{{ var_name }} = {{ composer }}.add_stage("Transformer", {{ stage_name }})
{%- for prop, value in properties.items() %}
{{ var_name }}.configuration.{{ prop }} = {{ value }}
{%- endfor %}
{% if loop_variables -%}
{{ var_name }}.configuration.loop_variables = [
    {% for loop_var in loop_variables -%}
    transformer.LoopVariable(
        {% for key, prop in loop_var.items()-%}
        {{ key }} = {{ prop }},
        {%- endfor %}
    ),
    {%- endfor %}
]
{%- endif %}
{% if stage_variables -%}
{{ var_name }}.configuration.stage_variables = [
    {% for stage_var in stage_variables -%}
    transformer.StageVariable(
        {% for key, prop in stage_var.items()-%}
        {{ key }} = {{ prop }},
        {%- endfor %}
    ),
    {%- endfor %}
]
{%- endif %}
{% if triggers -%}
{{ var_name }}.configuration.triggers = [
    {% for trigger in triggers -%}
    transformer.Trigger(
        {% for key, prop in trigger.items()-%}
        {{ key }} = {{ prop }},
        {%- endfor %}
    ),
    {%- endfor %}
]
{%- endif %}
{% if constraints -%}
{{ var_name }}.configuration.transformer_constraint = [
    {% for constraint in constraints -%}
    transformer.Constraint(
        {% for key, prop in constraint.items()-%}
        {{ key }} = {{ prop }},
        {%- endfor %}
    ),
    {%- endfor %}
]
{%- endif %}
