nodes: 0, module; 1, function_definition; 2, function_name:_get_sortgo; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, if_statement; 8, return_statement; 9, comment:"""Get function for sorting GO terms in a list of namedtuples."""; 10, comparison_operator:'sortgo' in self.datobj.kws; 11, block; 12, binary_operator:self.datobj.grprdflt.gosubdag.prt_attr['sort'] + "\n"; 13, string; 14, attribute; 15, return_statement; 16, subscript; 17, string:"\n"; 18, string_content:sortgo; 19, attribute; 20, identifier:kws; 21, subscript; 22, attribute; 23, string; 24, identifier:self; 25, identifier:datobj; 26, attribute; 27, string; 28, attribute; 29, identifier:prt_attr; 30, string_content:sort; 31, attribute; 32, identifier:kws; 33, string_content:sortgo; 34, attribute; 35, identifier:gosubdag; 36, identifier:self; 37, identifier:datobj; 38, attribute; 39, identifier:grprdflt; 40, identifier:self; 41, identifier:datobj
code: def _get_sortgo(self):
          """Get function for sorting GO terms in a list of namedtuples."""
          if 'sortgo' in self.datobj.kws:
              return self.datobj.kws['sortgo']
          return self.datobj.grprdflt.gosubdag.prt_attr['sort'] + "\n"