def do_sort(value, case_sensitive=False):
    if not case_sensitive:
        def sort_func(item):
            if isinstance(item, basestring):
                item = item.lower()
            return item
    else:
        sort_func = None
    return sorted(seq, key=sort_func)
Sort an iterable.  If the iterable is made of strings the second
dataset/ETHPy150Open IanLewis/kay/kay/lib/jinja2/filters.py/do_sort