def set(self, key, value, preserve=False, getset=False, expire=None):
        # The following will raise an error for unicode values that can't be
        # encoded to ascii. We could probably add an 'encoding' arg to init,
        # but then what do we do with get()? Convert back to unicode? And what
        # about ints, or pickled values?
        if getset:
            command = 'GETSET'
        elif preserve:
            return self.setnx(key, value)
        else:
            command = 'SET'

        if expire:
            self._send('SETEX', key, expire, value)
        else:
            self._send(command, key, value)
        return self.getResponse()
Test the core function doing the `sigm_times_exp` optimization.
dataset/ETHPy150Open deldotdr/txRedis/txredis/client.py/RedisClient.set--crossover with--dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/nnet/tests/test_sigm.py/T_sigmoid_opts.test_perform_sigm_times_exp