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

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

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