<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _wrap_jinja_filter(self, function):
 """Propagate exceptions as undefined values filter."""

        def wrapper(*args, **kwargs):
            """Filter wrapper."""
            try:
                return function(*args, **kwargs)
            except Exception:  # pylint: disable=broad-except
                return NestedUndefined()

        # Copy over Jinja filter decoration attributes.
        for attribute in dir(function):
            if attribute.endswith('filter'):
                setattr(wrapper, attribute, getattr(function, attribute))

        return wrapper