def unquote_string(self, string):
value = string[<NUM_LIT:1>:-<NUM_LIT:1>]<EOL>forbidden_sequences = {ESCAPE_SUBS[STRING_QUOTES[string[<NUM_LIT:0>]]]}<EOL>valid_sequences = set(ESCAPE_SEQUENCES) - forbidden_sequences<EOL>for seq in ESCAPE_REGEX.findall(value):<EOL><INDENT>if seq not in valid_sequences:<EOL><INDENT>raise self.error(f'<STR_LIT>')<EOL><DEDENT><DEDENT>for seq, sub in ESCAPE_SEQUENCES.items():<EOL><INDENT>value = value.replace(seq, sub)<EOL><DEDENT>return value<EOL>
Return the unquoted value of a quoted string.