nodes: 0, module; 1, function_definition; 2, function_name:sort_languages; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, identifier:order; 12, attribute; 13, comment:"""
          Sorts the Model languages.
  
          :param order: Order. ( Qt.SortOrder )
          """; 14, call; 15, assignment; 16, call; 17, identifier:Qt; 18, identifier:AscendingOrder; 19, attribute; 20, argument_list; 21, attribute; 22, call; 23, attribute; 24, argument_list; 25, identifier:self; 26, identifier:beginResetModel; 27, identifier:self; 28, identifier:__languages; 29, identifier:sorted; 30, argument_list; 31, identifier:self; 32, identifier:endResetModel; 33, attribute; 34, keyword_argument; 35, keyword_argument; 36, identifier:self; 37, identifier:__languages; 38, identifier:key; 39, lambda; 40, identifier:reverse; 41, identifier:order; 42, lambda_parameters; 43, parenthesized_expression; 44, identifier:x; 45, attribute; 46, identifier:x; 47, identifier:name
code: def sort_languages(self, order=Qt.AscendingOrder):
          """
          Sorts the Model languages.
  
          :param order: Order. ( Qt.SortOrder )
          """
  
          self.beginResetModel()
          self.__languages = sorted(self.__languages, key=lambda x: (x.name), reverse=order)
          self.endResetModel()