{%- macro id_node(id) -%}
    {%- if ',' in id|string() -%}
    <ScreenCell>{{ id }}</ScreenCell>
    {%- else -%}
    <ItemNumber>{{ id }}</ItemNumber>
    {%- endif -%}
{%- endmacro -%}

{%- macro emit_user_info(user_info) -%}
{#- The indentation here is a compromise to try and line up the fields as best we can in the two locations emitted. -#}
                    <AccountNumber>{{ user_info.account_number or '' }}</AccountNumber>
                    {%- if user_info.last_name %}
                    <LastName>{{ user_info.last_name }}</LastName>
                    {%- endif %}
                    {%- if user_info.first_name %}
                    <FirstName>{{ user_info.first_name }}</FirstName>
                    {%- endif %}
                    {%- if user_info.middle_initial %}
                    <MiddleInitial>{{ user_info.middle_initial }}</MiddleInitial>
                    {%- endif %}
                    {%- if user_info.address.street1 %}
                    <Address1>{{ user_info.address.street1 }}</Address1>
                    {%- endif %}
                    {%- if user_info.address.street2 %}
                    <Address2>{{ user_info.address.street2 }}</Address2>
                    {%- endif %}
                    {%- if user_info.address.street3 %}
                    <Address3>{{ user_info.address.street3 }}</Address3>
                    {%- endif %}
                    {%- if user_info.address.city %}
                    <City>{{ user_info.address.city }}</City>
                    {%- endif %}
                    {%- if user_info.address.state %}
                    <State>{{ user_info.address.state }}</State>
                    {%- endif %}
                    {%- if user_info.address.zip %}
                    <Zip>{{ user_info.address.zip }}</Zip>
                    {%- endif %}
                    {%- if user_info.phone %}
                    <Phone>{{ user_info.phone }}</Phone>
                    {%- endif %}
                    {%- if user_info.phone_ext %}
                    <PhoneExt>{{ user_info.phone_ext }}</PhoneExt>
                    {%- endif %}
{%- endmacro -%}
