def remove_duplicates(lst):
    """
    Utility function to remove duplicates from a list while preserving the
    order of the elements
    """
    seen = set()
    seen_add = seen.add
    return [item for item in lst if item not in seen and not seen_add(item)]