<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def longest_one_seg_prefix(self, word):
 """Return longest Unicode IPA prefix of a word Args: word (unicode):
 input word as Unicode IPA string Returns: unicode: longest single-segment prefix of `word` in database """

        for i in range(self.longest_seg, 0, -1):
            if word[:i] in self.seg_dict:
                return word[:i]
        return ''