nodes: 0, module; 1, function_definition; 2, function_name:set_process_sort; 3, parameters; 4, block; 5, identifier:self; 6, identifier:event_type; 7, expression_statement; 8, if_statement; 9, comment:"""Define the process auto sort key from the alert type."""; 10, attribute; 11, block; 12, identifier:glances_processes; 13, identifier:auto_sort; 14, expression_statement; 15, assignment; 16, attribute; 17, call; 18, identifier:glances_processes; 19, identifier:sort_key; 20, attribute; 21, argument_list; 22, identifier:self; 23, identifier:get_event_sort_key; 24, identifier:event_type
code: def set_process_sort(self, event_type):
          """Define the process auto sort key from the alert type."""
          if glances_processes.auto_sort:
              glances_processes.sort_key = self.get_event_sort_key(event_type)