code: def summarize_sec2hdrgos(self, sec2d_hdrgos):
          
          hdrgos_all = set([])
          hdrgos_grouped = set()
          hdrgos_ungrouped = set()
          sections_grouped = set()
          for sectionname, hdrgos in sec2d_hdrgos:
              self._chk_hdrgoids(hdrgos)
              hdrgos_all.update(hdrgos)
              if sectionname != HdrgosSections.secdflt:
                  hdrgos_grouped.update(hdrgos)
                  sections_grouped.add(sectionname)
              else:
                  hdrgos_ungrouped.update(hdrgos)
          return {'G': hdrgos_grouped,
                  'S': sections_grouped,
                  'U': hdrgos_all.difference(hdrgos_grouped)}
docs: Get counts of header GO IDs and sections.