@environmentfilter
def do_sort(environment, value, reverse=False, case_sensitive=False,
            attribute=None):
    if not case_sensitive:
        def sort_func(item):
            if isinstance(item, string_types):
                item = item.lower()
            return item
    else:
        sort_func = None
    if attribute is not None:
        getter = make_attrgetter(environment, attribute)
        def sort_func(item, processor=sort_func or (lambda x: x)):
            return processor(getter(item))
    return sorted(value, key=sort_func, reverse=reverse)
%prog parallel genome.fasta N
dataset/ETHPy150Open GoogleCloudPlatform/appengine-flask-skeleton/lib/jinja2/filters.py/do_sort--crossover with--dataset/ETHPy150Open tanghaibao/jcvi/annotation/maker.py/parallel