nodes: 0, module; 1, function_definition; 2, function_name:get_nts_sorted; 3, parameters; 4, block; 5, identifier:self; 6, identifier:hdrgo_prt; 7, identifier:hdrgos; 8, identifier:hdrgo_sort; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, return_statement; 13, comment:"""Return a flat list of grouped and sorted GO terms."""; 14, assignment; 15, call; 16, identifier:nts_flat; 17, identifier:nts_flat; 18, list; 19, attribute; 20, argument_list; 21, identifier:self; 22, identifier:get_sorted_hdrgo2usrgos; 23, identifier:hdrgos; 24, identifier:nts_flat; 25, identifier:hdrgo_prt; 26, identifier:hdrgo_sort
code: def get_nts_sorted(self, hdrgo_prt, hdrgos, hdrgo_sort):
          """Return a flat list of grouped and sorted GO terms."""
          nts_flat = []
          self.get_sorted_hdrgo2usrgos(hdrgos, nts_flat, hdrgo_prt, hdrgo_sort)
          return nts_flat