code: def unique(iterable, key=identity):
      
      seen = set()
      for item in iterable:
          item_key = key(item)
          if item_key not in seen:
              seen.add(item_key)
              yield item
docs: Yields all the unique values in an iterable maintaining order