code: def wr_txt(self, fout_txt):
          
          from goatools.wr_tbl import prt_txt
          data = self.get_data()
          with open(fout_txt, 'w') as prt:
              prtfmt = "{Depth_Level:>7} " \
                       "{BP_D:6,} {MF_D:6,} {CC_D:>6,} " \
                       "{BP_L:>6,} {MF_L:>6,} {CC_L:>6,}\n"
              prt.write("{TITLE}\n\n".format(TITLE=self.title))
              prt.write("         |<---- Depth ---->|  |<---- Level ---->|\n")
              prt.write("Dep/Lev     BP     MF     CC     BP     MF     CC\n")
              prt.write("-------  -----  -----  -----  -----  -----  -----\n")
              prt_txt(prt, data, prtfmt=prtfmt, title=self.title)
              sys.stdout.write("  {N:>5,} items WROTE: {TXT}\n".format(
                  N=len(data), TXT=fout_txt))
docs: Write counts of GO terms at all levels and depths.