nodes: 0, module; 1, function_definition; 2, function_name:sorted_conkeys; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, expression_statement; 8, comment:# Make for defined and sorted output:; 9, expression_statement; 10, for_statement; 11, if_statement; 12, return_statement; 13, identifier:prefix; 14, None; 15, comment:"""Return all condition keys in self.conditions as a list sorted
          suitable for print or write to a file. If prefix is given return
          only the ones prefixed with prefix."""; 16, assignment; 17, identifier:cond; 18, identifier:_COND_PREFIXES; 19, block; 20, not_operator; 21, block; 22, list_comprehension; 23, identifier:conkeys; 24, list; 25, expression_statement; 26, identifier:prefix; 27, return_statement; 28, identifier:key; 29, for_in_clause; 30, if_clause; 31, augmented_assignment; 32, identifier:conkeys; 33, identifier:key; 34, identifier:conkeys; 35, call; 36, identifier:conkeys; 37, call; 38, attribute; 39, argument_list; 40, identifier:sorted; 41, argument_list; 42, identifier:key; 43, identifier:startswith; 44, identifier:prefix; 45, list_comprehension; 46, keyword_argument; 47, identifier:key; 48, for_in_clause; 49, if_clause; 50, identifier:key; 51, attribute; 52, identifier:key; 53, attribute; 54, call; 55, identifier:self; 56, identifier:cond_int; 57, identifier:self; 58, identifier:conditions; 59, attribute; 60, argument_list; 61, identifier:key; 62, identifier:startswith; 63, identifier:cond
code: def sorted_conkeys(self, prefix=None):
          """Return all condition keys in self.conditions as a list sorted
          suitable for print or write to a file. If prefix is given return
          only the ones prefixed with prefix."""
  
          # Make for defined and sorted output:
          conkeys = []
          for cond in _COND_PREFIXES:
              conkeys += sorted([key for key in self.conditions
                                 if key.startswith(cond)], key=self.cond_int)
          if not prefix:
              return conkeys
          return [key for key in conkeys if key.startswith(prefix)]