class_docstr: A container for the nodes and labelled edges of a dependency structure.
docstr: Turn dependency graphs into NLTK trees.
  
  :param int i: index of a node
  :return: either a word (if the indexed node is a leaf) or a ``Tree``.
docstr_tok: ["Turn","dependency","graphs","into","NLTK","trees",".",":","param","int","i",":","index","of","a","node",":","return",":","either","a","word","(","if","the","indexed","node","is","a","leaf",")","or","a","``","Tree","``","."]
code: def _tree(self, i):
      """Turn dependency graphs into NLTK trees.
  
      :param int i: index of a node
      :return: either a word (if the indexed node is a leaf) or a ``Tree``.
      """
      node = self.get_by_address(i)
      word = node["word"]
      deps = sorted(chain.from_iterable(node["deps"].values()))
  
      if deps:
          return Tree(word, [self._tree(dep) for dep in deps])
      else:
          return word
  
imports: import subprocess
  import warnings
  from collections import defaultdict
  from itertools import chain
  from pprint import pformat
  from nltk.internals import find_binary
  from nltk.tree import Tree
label_desc: Use image node_id 18 for calling the DependencyGraph obj's underlying member method code with example usage: obj._tree(i) and returns: Tree, word