def quoted(s):
<EOL>s = s.strip(u'<STR_LIT:">')<EOL>if s[<NUM_LIT:0>] in (u'<STR_LIT:->', u'<STR_LIT:U+0020>'):<EOL><INDENT>return s<EOL><DEDENT>if u'<STR_LIT:U+0020>' in s or u'<STR_LIT:/>' in s:<EOL><INDENT>return u'<STR_LIT>' % s<EOL><DEDENT>else:<EOL><INDENT>return s<EOL><DEDENT>
quotes a string if necessary.