from typing import Sequence
from typing import List


def remove_duplicates(src: Sequence, ordered=True) -> List:
    """
    remove duplicates

    Args:
        src:
        ordered:

    Examples:
        >>> ls = [1,2,3,3,2,4,2,3,5]
        >>> remove_duplicates(ls)
        [1, 2, 3, 4, 5]

    """
    ret = list(set(src))

    if ordered:
        ret.sort(key=src.index)

    return ret