code: def prt_txt_desc2nts(self, prt, desc2nts, prtfmt):
          
          # 1-D: data to print is a flat list of namedtuples
          if 'flat' in desc2nts:
              nts = desc2nts.get('flat')
              # sys.stdout.write("FLAT NTS: {FLDS}\n".format(FLDS=" ".join(next(iter(nts))._fields)))
              prt_txt(prt, nts, prtfmt)
          # 2-D: data to print is a list of [(section, nts), ...
          else:
              for section, nts in desc2nts['sections']:
                  prt.write("\nSECTION: {SEC}\n".format(SEC=section))
                  prt_txt(prt, nts, prtfmt)
              grprobj = self.sortobj.grprobj
              dat = SummarySec2dHdrGos().summarize_sec2hdrnts(desc2nts['sections'])
              ugos_y = dat['G'].intersection(grprobj.usrgos)
              ugos_n = dat['U'].intersection(grprobj.usrgos)
              return {'GO_DESC':'usr', 'SECs':len(dat['S']), 'GOs':len(ugos_y),
                      'UNGRP':len(ugos_n), 'undesc':'ungrpd'}
docs: Print grouped and sorted GO IDs.