def cleanup_key(name):
name = name.lstrip('<STR_LIT:+>')<EOL>is_keypad = name.startswith('<STR_LIT>')<EOL>for mod in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>if name.startswith(mod):<EOL><INDENT>name = name[len(mod):]<EOL><DEDENT><DEDENT>if name == '<STR_LIT>':<EOL><INDENT>name = '<STR_LIT>'<EOL><DEDENT>elif name == '<STR_LIT>':<EOL><INDENT>name = '<STR_LIT>'<EOL><DEDENT>if name.endswith('<STR_LIT>'):<EOL><INDENT>name = '<STR_LIT>' + name[:-<NUM_LIT:2>]<EOL><DEDENT>if name.endswith('<STR_LIT>'):<EOL><INDENT>name = '<STR_LIT>' + name[:-<NUM_LIT:2>]<EOL><DEDENT>return normalize_name(name), is_keypad<EOL>
Formats a dumpkeys format to our standard.