def fail_when_undefined(value):
 if isinstance(value, jinja2.Undefined):
  value()
 return value

def fail_when_undefined ( value ) : if isinstance ( value , jinja2 . Undefined ) : value ( ) return value
filter to force a failure when the value is undefined .