This would probably be more readable by computing the label in a python block outside the tag.