<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def quote(text):
 """encode html entities"""

    text = unicode(text)
    return text.translate({
        ord('&'): u'&amp;',
        ord('<'): u'&lt;',
        ord('"'): u'&quot;',
        ord('>'): u'&gt;',
        ord('@'): u'&#64;',
        0xa0: u'&nbsp;'})