def _cmp_task_names(a, b):
    a = a.name
    b = b.name
    a_in_pavement = a.startswith("pavement.")
    b_in_pavement = b.startswith("pavement.")
    if a_in_pavement and not b_in_pavement:
        return 1
    if b_in_pavement and not a_in_pavement:
        return -1
    # trick taken from python3porting.org
    return (a > b) - (b < a)
dataset/ETHPy150Open paver/paver/paver/tasks.py/_cmp_task_names/original