code: function whenDeathListener(msg) {
        if (msg.context === 'leader' && msg.action === 'death') {
          leaderElector.applyOnce().then(function () {
            if (leaderElector.isLeader) finish();
          });
        }
      }
docs: try when other leader dies