def tag_items(self, tag, *items):
        items = list(set(self.encode(item) for item in items) - self._r.smembers(self.tag_key(tag)))
        if len(items) == 0:
            return []
        with self._r.pipeline() as pipe:
            pipe.zincrby(self.tags_key, tag, len(items))
            pipe.sadd(self.tag_key(tag), *items)
            for item in items:
                pipe.zincrby(self.items_key, item, 1)
            pipe.execute()
        return map(self.decode, items)
dataset/ETHPy150Open jdp/taxon/taxon/backends/redis.py/RedisBackend.tag_items/original