code: def _words_at_the_beginning(word, tree, prefix=""):
      '''
      We return all portions of the tree corresponding to the beginning
      of `word`. This is used recursively, so we pass the prefix so we
      can return meaningful words+translations.
      '''
      l = []
      if "" in tree:
          l.append([prefix, tree[""]])
      if len(word) > 0 and word[0] in tree:
          l.extend(_words_at_the_beginning(
              word[1:],
              tree[word[0]],
              prefix=prefix+word[0]
          ))
      return f _words_at_the_beginning(word, tree, prefix=""):
      '''
      We return all portions of the tree corresponding to the beginning
      of `word`. This is used recursively, so we pass the prefix so we
      can return meaningful words+translations.
      '''
      l = []
      if "" in tree:
          l.append([prefix, tree[""]])
      if len(word) > 0 and word[0] in tree:
          l.extend(_words_at_the_beginning(
              word[1:],
              tree[word[0]],
              prefix=prefix+word[0]
          ))
      return l
docs: We return all portions of the tree corresponding to the beginning
      of `word`. This is used recursively, so we pass the prefix so we
      can return meaningful words+translations.