def tree(self):
        self.read()
        for p in self._ptable.values():
            try: 
                self._ptable[p.ppid]._children.append(p.pid)
            except __HOLE__: # no child list yet
                self._ptable[p.ppid]._children = sortedlist([p.pid])

        pslist = self._tree_helper(self._ptable[0], 0, [])
        return "\n".join(pslist)

    # recursive helper to indent according to child depth
dataset/ETHPy150Open kdart/pycopia/core/pycopia/OS/Win32/procfs.py/ProcStatTable.tree