<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encode (text):
 """Encode text with default encoding if its Unicode."""

    if isinstance(text, unicode):
        return text.encode(i18n.default_encoding, 'ignore')
    return text