nodes: 0, module; 1, function_definition; 2, function_name:set_sorting; 3, parameters; 4, block; 5, identifier:self; 6, identifier:flag; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, comment:"""Enable result sorting after search is complete."""; 11, assignment; 12, call; 13, subscript; 14, identifier:flag; 15, attribute; 16, argument_list; 17, attribute; 18, string; 19, call; 20, identifier:setSectionsClickable; 21, comparison_operator:flag == ON; 22, identifier:self; 23, identifier:sorting; 24, string_content:status; 25, attribute; 26, argument_list; 27, identifier:flag; 28, identifier:ON; 29, identifier:self; 30, identifier:header
code: def set_sorting(self, flag):
          """Enable result sorting after search is complete."""
          self.sorting['status'] = flag
          self.header().setSectionsClickable(flag == ON)