code: def read_py(self, fin_txt, get_goids_only, exclude_ungrouped, prt=sys.stdout):
          
          goids_fin = self._read_py(fin_txt, get_goids_only, exclude_ungrouped)
          sections = self._read_finish(goids_fin, prt)
          # Print summary of GO IDs read
          if prt is not None:
              self._prt_read_msg(prt, fin_txt, exclude_ungrouped)
          return sections
docs: Read GO IDs or sections data from a Python file.