<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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()