#NEWLINE# def _tree( self , i ) : #NEWLINE# #INDENT# ' Turn dependency graphs into NLTK trees.\n\n        :param int i: index of a node\n        :return: either a word (if the indexed node is a leaf) or a ``Tree``.\n        ' #NEWLINE# node = self . get_by_address ( i ) #NEWLINE# word = dep [ 'word' ] #NEWLINE# deps = sorted ( chain . from_iterable ( node [ 'deps' ] . values ( ) ) ) #NEWLINE# if deps : #NEWLINE# #INDENT# return Tree ( word , [ self . _tree ( dep ) for dep in deps ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return word