code: function(tuples) {
          return Promise.try(() => {
              const txn = this.db.transaction(["users"], "readwrite");
              const store = txn.objectStore("users");
              for (const tuple of tuples) {
                  store.put({
                      userId: tuple[0],
                      event: tuple[1],
                  }); // put == UPSERT
              }
              return txnAsPromise(txn);
          });
      }
docs: Persist a list of [user id, presence event] they are for.
  Users with the same 'userId' will be replaced.
  Presence events should be the event in its raw form (not the Event
  object)
  @param {Object[]} tuples An array of [userid, event] tuples
  @return {Promise} Resolves if the users were persisted.