code: def _read_txt(self, fin_txt, get_goids_only, exclude_ungrouped):
          
          goids_sec = []
          with open(fin_txt) as istrm:
              # Lines starting with a GO ID will have that GO ID read and stored.
              #   * Lines that do not start with a GO ID will be ignored.
              #   * Text after the 10 characters in a GO ID will be ignored.
              section_name = None
              for line in istrm:
                  if line[:3] == "GO:":
                      goids_sec.append(line[:10])
                  elif not get_goids_only and ":" in line:
                      mtch = self.srch_section.match(line)
                      if mtch:
                          secstr = mtch.group(1)
                          if section_name is not None and goids_sec:
                              self.section2goids[section_name] = goids_sec
                          if not exclude_ungrouped or secstr != HdrgosSections.secdflt:
                              section_name = secstr
                              self.sections_seen.append(section_name)
                          else:
                              section_name = None
                          goids_sec = []
              if section_name is not None and goids_sec:
                  self.section2goids[section_name] = goids_sec
          return goids_sec
docs: Read GO file. Store results in: section2goids sections_seen. Return goids_fin.