def parse_solver_setting(s):
try:<EOL><INDENT>key, value = s.split('<STR_LIT:=>', <NUM_LIT:1>)<EOL><DEDENT>except ValueError:<EOL><INDENT>key, value = s, '<STR_LIT:yes>'<EOL><DEDENT>if key in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>value = value.lower() in ('<STR_LIT:1>', '<STR_LIT:yes>', '<STR_LIT:true>', '<STR_LIT>')<EOL><DEDENT>elif key in ('<STR_LIT>',):<EOL><INDENT>value = int(value)<EOL><DEDENT>elif key in ('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'):<EOL><INDENT>value = float(value)<EOL><DEDENT>return key, value<EOL>
Parse a string containing a solver setting