def as_singular(result_key):
if result_key.endswith('<STR_LIT>'):<EOL><INDENT>return re.sub('<STR_LIT>', '<STR_LIT:y>', result_key)<EOL><DEDENT>elif result_key.endswith('<STR_LIT>'):<EOL><INDENT>return re.sub("<STR_LIT>", "<STR_LIT>", result_key)<EOL><DEDENT>elif result_key.endswith('<STR_LIT>'):  <EOL><INDENT>return result_key[:-<NUM_LIT:2>]<EOL><DEDENT>elif result_key.endswith('<STR_LIT:s>'):<EOL><INDENT>return result_key[:-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>return result_key<EOL><DEDENT>
Given a result key, return in the singular form