'Helper method for C{get} and C{getMultiple}.'

def _get(self, keys, withIdentifier, multiple):

    keys = list(keys)
    if self._disconnected:
        return fail(RuntimeError('not    connected'))
    for key in keys:
        if (not isinstance(key, bytes)):
            return fail(ClientError(('Invalid    type    for    key:    %s,    expecting    bytes' % (type(key),))))
        if (len(key) > self.MAX_KEY_LENGTH):
            return fail(ClientError('Key    too    long'))
    if withIdentifier:
        cmd = 'gets'
    else:
        cmd = 'get'
    fullcmd = '    '.join(([cmd] + keys))
    self.sendLine(fullcmd)
    if multiple:
        values = dict([(key, (0, '', None)) for key in keys])
        cmdObj = Command(cmd, keys=keys, values=values, multiple=True)
    else:
        cmdObj = Command(cmd, key=keys[0], value=None, flags=0, cas='', multiple=False)
    self._current.append(cmdObj)
    return cmdObj._deferred
