code: def wr_txt_grouping_gos(self):
          
          prt_goids = self.grprobj.gosubdag.prt_goids
          for hdrgo, usrgos in self.grprobj.hdrgo2usrgos.items():
              keygos = usrgos.union([hdrgo])
              fout_txt = "{BASE}.txt".format(BASE=self.grprobj.get_fout_base(hdrgo))
              with open(fout_txt, 'w') as prt:
                  prt_goids(keygos, prt=prt)
                  sys.stdout.write("  {N:5,} GO IDs WROTE: {TXT}\n".format(
                      N=len(keygos), TXT=fout_txt))
docs: Write one file per GO group.