@environmentfilter
def do_last(environment, seq):
    """Return the last item of a sequence."""
    try:
        return iter(reversed(seq)).next()
    except __HOLE__:
        return environment.undefined('No last item, sequence was empty.')
dataset/ETHPy150Open IanLewis/kay/kay/lib/jinja2/filters.py/do_last