'IMAP4rev1 extension SORT command.
(typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)'

def sort(self, sort_criteria, charset, *search_criteria):

    name = 'SORT'
    if ((sort_criteria[0], sort_criteria[(-1)]) != ('(', ')')):
        sort_criteria = ('(%s)' % sort_criteria)
    (typ, dat) = self._simple_command(name, sort_criteria, charset, *search_criteria)
    return self._untagged_response(typ, dat, name)
