<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def intern(self, text):
 """Interns the given Unicode sequence into the symbol table. Note: This operation is only valid on local symbol tables. Args: text (unicode):
 The target to intern. Returns: SymbolToken: The mapped symbol token which may already exist in the table. """

        if self.table_type.is_shared:
            raise TypeError('Cannot intern on shared symbol table')
        if not isinstance(text, six.text_type):
            raise TypeError('Cannot intern non-Unicode sequence into symbol table: %r' % text)

        token = self.get(text)
        if token is None:
            token = self.__add_text(text)
        return token