code: public SharedTreeGraph _computeGraph(int treeToPrint) {
          SharedTreeGraph g = new SharedTreeGraph();
  
          if (treeToPrint >= _ntree_groups) {
              throw new IllegalArgumentException("Tree " + treeToPrint + " does not exist (max " + _ntree_groups + ")");
          }
  
          int j;
          if (treeToPrint >= 0) {
              j = treeToPrint;
          }
          else {
              j = 0;
          }
  
          for (; j < _ntree_groups; j++) {
              for (int i = 0; i < _ntrees_per_group; i++) {
                  int itree = treeIndex(j, i);
                  String[] domainValues = isSupervised() ? getDomainValues(getResponseIdx()) : null;
                  String treeName = treeName(j, i, domainValues);
                  SharedTreeSubgraph sg = g.makeSubgraph(treeName);
                  computeTreeGraph(sg, _compressed_trees[itree], _compressed_trees_aux[itree],
                          getNames(), getDomainValues());
              }
  
              if (treeToPrint >= 0) {
                  break;
              }
          }
  
          return g;
      }
docs: Compute a graph of the forest.
  
  @return A graph of the forest.