
from typing import Iterable, List, Set

def _dedupe_preserve_order(urls: Iterable[str]) -> List[str]:
    seen: Set[str] = set()
    out: List[str] = []
    for u in urls:
        if not u or not isinstance(u, str):
            continue
        if u in seen:
            continue
        seen.add(u)
        out.append(u)
    return out
