<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ordered_deduplicate(sequence):
 """ Returns the sequence as a tuple with the duplicates removed, preserving input order. Any duplicates following the first occurrence are removed. (1, 2, 3, 32) Based on recipe from this StackOverflow post: http://stackoverflow.com/a/480227 """


    seen = set()
    # Micro optimization: each call to seen_add saves an extra attribute
    # lookup in most iterations of the loop.
    seen_add = seen.add

    return tuple(x for x in sequence if not (x in seen or seen_add(x)))