docs: def replay(self, event, ts=0, end_ts=None, with_ts=False):
          """Replay events based on timestamp.
  
          If you split namespace with ts, the replay will only return events
          within the same namespace.
  
          :param event: event name
          :param ts: replay events after ts, default from 0.
          :param end_ts: replay events to ts, default to "+inf".
          :param with_ts: return timestamp with events, default to False.
          :return: list of pks when with_ts set to False, list of (pk, ts) tuples
           when with_ts is True.
          """
          key = self._keygen(event, ts)
          end_ts = end_ts if end_ts else "+inf"
          elements = self.r.zrangebyscore(key, ts, end_ts, withscores=with_ts)
  
          if not with_ts:
              return [s(e) for e in elements]
          else:
              return [(s(e[0]), int(e[1])) for e in elements]