code: private void stepDown() {
      if (context.getLeader() != null && context.getLeader().equals(context.getCluster().member())) {
        context.setLeader(0);
      }
    }
docs: Ensures the local server is not the leader.