def merge_no_repeat(iter1, iter2, key=None):
    if key is None:
        key = lambda x: x
ref = next(iter1, None)
for elem in iter2:
    key_elem = key(elem)
while ref is not None and key_elem > key(ref):
    yield ref
ref = next(iter1, None)
if ref is None or key_elem < key(ref):
    yield elem
for elem in iter1:
    yield elem
Merge two sorted iterators without replace