Return the unique elements from the input, in order.

def unique_list(input_, key=lambda x:x):
    """Return the unique elements from the input, in order."""
    seen = set()
    output = []
    for x in input_:
        keyx = key(x)
        if keyx not in seen:
            seen.add(keyx)
            output.append(x)
    return output