@register(key='<STR_LIT>')<EOL>def many(prompt, *args, **kwargs):
def get_options(options, chosen):<EOL><INDENT>return [options[i] for i, c in enumerate(chosen) if c]<EOL><DEDENT>def get_verbose_options(verbose_options, chosen):<EOL><INDENT>no, yes = '<STR_LIT:U+0020>', '<STR_LIT>'<EOL>if sys.version_info < (<NUM_LIT:3>, <NUM_LIT:3>):<EOL><INDENT>no, yes = '<STR_LIT:U+0020>', '<STR_LIT:@>'<EOL><DEDENT>opts = ['<STR_LIT>'.format(yes if c else no, verbose_options[i]) for i, c in enumerate(chosen)]<EOL>return opts + ['<STR_LIT>'.format('<STR_LIT:U+0020>', kwargs.get('<STR_LIT>', '<STR_LIT>'))]<EOL><DEDENT>options, verbose_options = prepare_options(args)<EOL>chosen = [False] * len(options)<EOL>index = kwargs.get('<STR_LIT>', <NUM_LIT:0>)<EOL>default = kwargs.get('<STR_LIT:default>', None)<EOL>if isinstance(default, list):<EOL><INDENT>for idx in default:<EOL><INDENT>chosen[idx] = True<EOL><DEDENT><DEDENT>if isinstance(default, int):<EOL><INDENT>chosen[default] = True<EOL><DEDENT>while True:<EOL><INDENT>try:<EOL><INDENT>index = one(prompt, *get_verbose_options(verbose_options, chosen), return_index=True, idx=index)<EOL><DEDENT>except QuestionnaireGoBack:<EOL><INDENT>if any(chosen):<EOL><INDENT>raise QuestionnaireGoBack(<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>raise QuestionnaireGoBack<EOL><DEDENT><DEDENT>if index == len(options):<EOL><INDENT>return get_options(options, chosen)<EOL><DEDENT>chosen[index] = not chosen[index]<EOL><DEDENT>
Calls `pick` in a while loop to allow user to pick many
    options. Returns a list of chosen options.