How can I fix the FulfillmentDisplayStatus liquid code for order delivery status?

Hi,

I am trying to perform an action if the FulfillmentDisplayStatus of an order is DELIVERED.

I am not an expert, could you help me fix this code? I am pretty sure it’s wrong past the second if statement.

{% for tag in order.tags %}
  {% if tag contains 'TEST' %}
    {% if order.fulfillment_status == 'fulfilled' %} 
      {% if FulfillmentDisplayStatus == 'DELIVERED' %}

      {% endif %}
    {% endif %}
  {% endif %}
{% endfor %}