parameters: (gen)
docstring: given a generator of pairs (x,y), generate one x for each value of y
docstring_summary: given a generator of pairs (x,y), generate one x for each value of y
docstring_tokens: given a generator of pairs ( x y ) generate one x for each value of y
function: def unique2(gen):
      """ given a generator of pairs (x,y), generate one x for each value of y """
      memo = set()
      for x,y in gen:
          if y not in memo:
              memo.add(y)
              yield x
function_tokens: def unique2 ( gen ) : memo = set ( ) for x , y in gen : if y not in memo : memo . add ( y ) yield x