nodes: 0, module; 1, function_definition; 2, function_name:sort_file_tabs_alphabetically; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, while_statement; 8, comment:"""Sort open tabs alphabetically."""; 9, comparison_operator:self.sorted() is False; 10, block; 11, call; 12, False; 13, for_statement; 14, attribute; 15, argument_list; 16, identifier:i; 17, call; 18, block; 19, identifier:self; 20, identifier:sorted; 21, identifier:range; 22, argument_list; 23, if_statement; 24, integer:0; 25, call; 26, parenthesized_expression; 27, block; 28, attribute; 29, argument_list; 30, comparison_operator:self.tabs.tabBar().tabText(i) >
                          self.tabs.tabBar().tabText(i + 1); 31, expression_statement; 32, call; 33, identifier:count; 34, call; 35, call; 36, call; 37, attribute; 38, argument_list; 39, attribute; 40, argument_list; 41, attribute; 42, argument_list; 43, attribute; 44, argument_list; 45, attribute; 46, identifier:tabBar; 47, call; 48, identifier:tabText; 49, identifier:i; 50, call; 51, identifier:tabText; 52, binary_operator:i + 1; 53, call; 54, identifier:moveTab; 55, identifier:i; 56, binary_operator:i + 1; 57, identifier:self; 58, identifier:tabs; 59, attribute; 60, argument_list; 61, attribute; 62, argument_list; 63, identifier:i; 64, integer:1; 65, attribute; 66, argument_list; 67, identifier:i; 68, integer:1; 69, attribute; 70, identifier:tabBar; 71, attribute; 72, identifier:tabBar; 73, attribute; 74, identifier:tabBar; 75, identifier:self; 76, identifier:tabs; 77, identifier:self; 78, identifier:tabs; 79, identifier:self; 80, identifier:tabs
code: def sort_file_tabs_alphabetically(self):
          """Sort open tabs alphabetically."""
          while self.sorted() is False:
              for i in range(0, self.tabs.tabBar().count()):
                  if(self.tabs.tabBar().tabText(i) >
                          self.tabs.tabBar().tabText(i + 1)):
                      self.tabs.tabBar().moveTab(i, i + 1)