<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unique(seq, key=None):
 	""" 	Create a unique list or tuple from a provided list or tuple and preserve the 	order. 	:param seq: The list or tuple to preserve unique items from. 	:type seq: list, tuple 	:param key: If key is provided it will be called during the 		comparison process. 	:type key: function, None 	"""

	if key is None:
		key = lambda x: x
	preserved_type = type(seq)
	if preserved_type not in (list, tuple):
		raise TypeError("unique argument 1 must be list or tuple, not {0}".format(preserved_type.__name__))
	seen = []
	result = []
	for item in seq:
		marker = key(item)
		if marker in seen:
			continue
		seen.append(marker)
		result.append(item)
	return preserved_type(result)