from typing import Iterable
from typing import List


def _unique(seq: Iterable) -> List:
    """order-preserving unique elements in `seq`."""
    out = []
    seen = set()
    for x in seq:
        if x in seen:
            continue
        out.append(x)
        seen.add(x)
    return out