nodes: 0, module; 1, function_definition; 2, function_name:get_ntgos_sorted; 3, parameters; 4, block; 5, identifier:self; 6, identifier:hdrgos; 7, expression_statement; 8, expression_statement; 9, return_statement; 10, comment:"""Return sorted Grouper namedtuples if there are user GO IDs underneath."""; 11, assignment; 12, call; 13, identifier:go2nt; 14, attribute; 15, identifier:sorted; 16, argument_list; 17, attribute; 18, identifier:go2nt; 19, list_comprehension; 20, keyword_argument; 21, identifier:self; 22, identifier:grprobj; 23, subscript; 24, for_in_clause; 25, if_clause; 26, identifier:key; 27, attribute; 28, identifier:go2nt; 29, identifier:go; 30, identifier:go; 31, identifier:hdrgos; 32, comparison_operator:go in go2nt; 33, identifier:self; 34, identifier:fncsortnt; 35, identifier:go; 36, identifier:go2nt
code: def get_ntgos_sorted(self, hdrgos):
          """Return sorted Grouper namedtuples if there are user GO IDs underneath."""
          go2nt = self.grprobj.go2nt
          return sorted([go2nt[go] for go in hdrgos if go in go2nt], key=self.fncsortnt)