nodes: 0, module; 1, function_definition; 2, function_name:get_sortobj; 3, parameters; 4, block; 5, identifier:self; 6, identifier:goea_results; 7, dictionary_splat_pattern; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, comment:# hdrgo_prt", "section_prt", "top_n", "use_sections"; 15, expression_statement; 16, return_statement; 17, identifier:kws; 18, comment:"""Return a Grouper object, given a list of GOEnrichmentRecord."""; 19, assignment; 20, assignment; 21, assignment; 22, assignment; 23, call; 24, assignment; 25, identifier:sortobj; 26, identifier:nts_goea; 27, call; 28, identifier:goids; 29, call; 30, identifier:go2nt; 31, dictionary_comprehension; 32, identifier:grprobj; 33, call; 34, attribute; 35, argument_list; 36, identifier:sortobj; 37, call; 38, attribute; 39, argument_list; 40, identifier:set; 41, generator_expression; 42, pair; 43, for_in_clause; 44, identifier:Grouper; 45, argument_list; 46, identifier:grprobj; 47, identifier:prt_summary; 48, attribute; 49, identifier:Sorter; 50, argument_list; 51, call; 52, identifier:get_goea_nts_prt; 53, dictionary_splat; 54, attribute; 55, for_in_clause; 56, attribute; 57, identifier:nt; 58, identifier:nt; 59, identifier:nts_goea; 60, string:"GOEA"; 61, identifier:goids; 62, attribute; 63, attribute; 64, keyword_argument; 65, identifier:sys; 66, identifier:stdout; 67, identifier:grprobj; 68, keyword_argument; 69, identifier:MgrNtGOEAs; 70, argument_list; 71, identifier:kws; 72, identifier:nt; 73, identifier:GO; 74, identifier:nt; 75, identifier:nts_goea; 76, identifier:nt; 77, identifier:GO; 78, identifier:self; 79, identifier:hdrobj; 80, attribute; 81, identifier:gosubdag; 82, identifier:go2nt; 83, identifier:go2nt; 84, identifier:section_sortby; 85, lambda; 86, identifier:goea_results; 87, identifier:self; 88, identifier:grprdflt; 89, lambda_parameters; 90, call; 91, identifier:nt; 92, identifier:getattr; 93, argument_list; 94, identifier:nt; 95, attribute; 96, identifier:self; 97, identifier:pval_fld
code: def get_sortobj(self, goea_results, **kws):
          """Return a Grouper object, given a list of GOEnrichmentRecord."""
          nts_goea = MgrNtGOEAs(goea_results).get_goea_nts_prt(**kws)
          goids = set(nt.GO for nt in nts_goea)
          go2nt = {nt.GO:nt for nt in nts_goea}
          grprobj = Grouper("GOEA", goids, self.hdrobj, self.grprdflt.gosubdag, go2nt=go2nt)
          grprobj.prt_summary(sys.stdout)
          # hdrgo_prt", "section_prt", "top_n", "use_sections"
          sortobj = Sorter(grprobj, section_sortby=lambda nt: getattr(nt, self.pval_fld))
          return sortobj