code: def longest_one_seg_prefix(self, word):
          
          for i in range(self.longest_seg, 0, -1):
              if word[:i] in self.seg_dict:
                  return word[:i]
          return ''
docs: 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