def pymux_key_to_prompt_toolkit_key_sequence(key):
<EOL>if key.lower().startswith('<STR_LIT>'):<EOL><INDENT>key = '<STR_LIT>' + key[<NUM_LIT:4>:]<EOL><DEDENT>elif key.lower().startswith('<STR_LIT>'):<EOL><INDENT>key = '<STR_LIT>' + key[<NUM_LIT:2>:]<EOL><DEDENT>elif key.lower().startswith('<STR_LIT>'):<EOL><INDENT>key = '<STR_LIT>' + key[<NUM_LIT:2>:]<EOL><DEDENT>try:<EOL><INDENT>return PYMUX_TO_PROMPT_TOOLKIT_KEYS[key]<EOL><DEDENT>except KeyError:<EOL><INDENT>if len(key) == <NUM_LIT:1>:<EOL><INDENT>return (key, )<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>' % (key, ))<EOL><DEDENT><DEDENT>
Turn a pymux description of a key. E.g.  "C-a" or "M-x" into a
prompt-toolkit key sequence.

Raises `ValueError` if the key is not known.