def unique_list(lst):
    """
    Removes duplicates from a list while preserving order
    """
    res = []
    for i, item in enumerate(lst):
        if i == len(lst) - 1 or lst[i + 1] != item:
            res.append(item)
    return res
dataset/ETHPy150Open fusionbox/django-widgy/widgy/debugtoolbar/templates.py/unique_list/original