'Execute "command arg ..." with messages identified by UID,
rather than message number.
(typ, [data]) = <instance>.uid(command, arg1, arg2, ...)
Returns response appropriate to \'command\'.'

def uid(self, command, *args):

    command = command.upper()
    if (command not in Commands):
        raise self.error(('Unknown    IMAP4    UID    command:    %s' % command))
    if (self.state not in Commands[command]):
        raise self.error(('command    %s    illegal    in    state    %s,    only    allowed    in    states    %s' % (command, self.state, ',    '.join(Commands[command]))))
    name = 'UID'
    (typ, dat) = self._simple_command(name, command, *args)
    if (command in ('SEARCH', 'SORT', 'THREAD')):
        name = command
    else:
        name = 'FETCH'
    return self._untagged_response(typ, dat, name)
