parameters: (func)
return_statement: return lambda arg,value2: set(x for (x,y) in func(arg) if y == value2)
docstring: Given a function of one argument returning a generator of
      pairs, return a function returning a generator of the first
      elements whose second elements match the second argument
docstring_summary: Given a function of one argument returning a generator of
      pairs, return a function returning a generator of the first
      elements whose second elements match the second argument
docstring_tokens: Given a function of one argument returning a generator of pairs return a function returning a generator of the first elements whose second elements match the second argument
function: def filter2(func):
      """ Given a function of one argument returning a generator of
      pairs, return a function returning a generator of the first
      elements whose second elements match the second argument"""
      return lambda arg,value2: set(x for (x,y) in func(arg) if y == value2)
function_tokens: def filter2 ( func ) : return lambda arg , value2 : set ( x for ( x , y ) in func ( arg ) if y == value2 )