Jinja2 block that is unreadable
In the end I refactored like this:

{% set node_group_name = sceptre_user_data.node_group_name %}
{% set node_labels = sceptre_user_data.node_labels %}
{% set taints   = sceptre_user_data.taints %}
{% set cni_custom_network = sceptre_user_data.cni_custom_network %}

...

do_bootstrap() {
  {% set args = "--kubelet-extra-args '--node-labels=nodegroup=" + node_group_name %}

  {% if node_labels != "None" %}
    {% set args = args + "," + node_labels %}
  {% endif %}

  {% if cni_custom_network == "Yes" %}
    zone=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)
    {% set args = args + ",k8s.amazonaws.com/eniConfig=pod-netconfig-$zone" %}
  {% endif %}

  {% if taints != "None" %}
    {% set args = args + " --register-with-taints=" + taints %}
  {% endif %}

  {% set args = args + "'" %}

  eval "/etc/eks/bootstrap.sh ${EKSClusterName} {{ args }}"
}

do_bootstrap


I would still welcome feedback from anyone who knows a Jinja2 trick that might help that I don't know.