from typing import Union


def _dedup(data: Union[list, tuple]) -> list:
    """Remove duplicates from a list/tuple, then return a new clean list"""
    ndata = []
    for d in data:
        if d in ndata: continue
        ndata.append(d)
    return ndata