def METHOD_NAME(value):
    """Return true if the variable is defined:
    .. sourcecode:: jinja
        {% if variable is defined %}
            value of variable: {{ variable }}
        {% else %}
            variable is not defined
        {% endif %}
    See the :func:`default` filter for a simple way to set undefined
    variables.
    """
    return not isinstance(value, Undefined)