code: def zunionstore(self, destkey, key, *keys,
                      with_weights=False, aggregate=None):
          keys = (key,) + keys
          numkeys = len(keys)
          args = []
          if with_weights:
              assert all(isinstance(val, (list, tuple)) for val in keys), (
                  "All key arguments must be (key, weight) tuples")
              weights = ['WEIGHTS']
              for key, weight in keys:
                  args.append(key)
                  weights.append(weight)
              args.extend(weights)
          else:
              args.extend(keys)
          if aggregate is self.ZSET_AGGREGATE_SUM:
              args.extend(('AGGREGATE', 'SUM'))
          elif aggregate is self.ZSET_AGGREGATE_MAX:
              args.extend(('AGGREGATE', 'MAX'))
          elif aggregate is self.ZSET_AGGREGATE_MIN:
              args.extend(('AGGREGATE', 'MIN'))
          fut = self.execute(b'ZUNIONSTORE', destkey, numkeys, *args)
          return fut