def choice(choices):
def decorator(function):<EOL><INDENT>"""<STR_LIT>"""<EOL>@functools.wraps(function)<EOL>def wrapper(*args, **kwargs):<EOL><INDENT>"""<STR_LIT>"""<EOL>series = function(*args, **kwargs)<EOL>return series.isin(set(choices))<EOL><DEDENT>return wrapper<EOL><DEDENT>return decorator<EOL>
Test that the data items are members of the set `choices`.