Like ZADD, but supports different score update modes, in case the
        member already exists in the ZSET:
        - "nx": Don't update the score
        - "xx": Only update elements that already exist. Never add elements.
        - "min": Use the smaller of the given and existing score
        - "max": Use the larger of the given and existing score

def zadd(self, key, score, member, mode, client=None):
        """
        Like ZADD, but supports different score update modes, in case the
        member already exists in the ZSET:
        - "nx": Don't update the score
        - "xx": Only update elements that already exist. Never add elements.
        - "min": Use the smaller of the given and existing score
        - "max": Use the larger of the given and existing score
        """
        if mode == 'nx':
            f = self._zadd_noupdate
        elif mode == 'xx':
            f = self._zadd_update_existing
        elif mode == 'min':
            f = self._zadd_update_min
        elif mode == 'max':
            f = self._zadd_update_max
        else:
            raise NotImplementedError('mode "%s" unsupported' % mode)
        return f(keys=[key], args=[score, member], client=client)