def _remove_dupes(self, phonetic):
alt_string = phonetic<EOL>alt_array = alt_string.split('<STR_LIT:|>')<EOL>result = '<STR_LIT:|>'<EOL>for i in range(len(alt_array)):<EOL><INDENT>alt = alt_array[i]<EOL>if alt and '<STR_LIT:|>' + alt + '<STR_LIT:|>' not in result:<EOL><INDENT>result += alt + '<STR_LIT:|>'<EOL><DEDENT><DEDENT>return result[<NUM_LIT:1>:-<NUM_LIT:1>]<EOL>
Remove duplicates from a phonetic encoding list.

        Parameters
        ----------
        phonetic : str
            A Beider-Morse phonetic encoding

        Returns
        -------
        str
            A Beider-Morse phonetic code