code: def sentence2freqt(docgraph, root, successors=None, include_pos=False,
                     escape_func=FREQT_ESCAPE_FUNC):
      
      if successors is None:
          successors = sorted_bfs_successors(docgraph, root)
  
      if root in successors:  # root node has children / subgraphs
          embed_str = u"".join(sentence2freqt(docgraph, child, successors,
                                              include_pos=include_pos,
                                              escape_func=escape_func)
                               for child in successors[root])
          return node2freqt(
              docgraph, root, embed_str, include_pos=include_pos,
              escape_func=escape_func)
      else:  # root node has no children / subgraphs
          return node2freqt(docgraph, root, include_pos=include_pos,
                            escape_func=escape_func)
docs: convert a sentence subgraph into a FREQT string.