def _get_dest(*args, **kwargs):  
prefix_chars = kwargs.get('<STR_LIT>', '<STR_LIT:->')<EOL>option_strings = []<EOL>long_option_strings = []<EOL>for option_string in args:<EOL><INDENT>option_strings.append(option_string)<EOL>if option_string[<NUM_LIT:0>] in prefix_chars:<EOL><INDENT>if len(option_string) > <NUM_LIT:1>:<EOL><INDENT>if option_string[<NUM_LIT:1>] in prefix_chars:<EOL><INDENT>long_option_strings.append(option_string)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>dest = kwargs.get('<STR_LIT>', None)<EOL>if dest is None:<EOL><INDENT>if long_option_strings:<EOL><INDENT>dest_option_string = long_option_strings[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>dest_option_string = option_strings[<NUM_LIT:0>]<EOL><DEDENT>dest = dest_option_string.lstrip(prefix_chars)<EOL>if not dest:<EOL><INDENT>msg = _('<STR_LIT>')<EOL>raise ValueError(msg % option_string)<EOL><DEDENT>dest = dest.replace('<STR_LIT:->', '<STR_LIT:_>')<EOL><DEDENT>return dest<EOL>
Duplicate argument names processing logic from argparse.

argparse stores the variable in the namespace using the provided dest name,
the first long option string, or the first short option string