class LeaderInfoContributor implements InfoContributor {

	private final LeadershipController leadershipController;

	private final Candidate candidate;

	public LeaderInfoContributor(LeadershipController leadershipController, Candidate candidate) {
		this.leadershipController = leadershipController;
		this.candidate = candidate;
	}

	@Override
	public void contribute(Builder builder) {<FILL_FUNCTION_BODY>}

}

		Map<String, Object> details = new HashMap<>();
		leadershipController.getLocalLeader().ifPresentOrElse(leader -> {
			details.put("leaderId", leader.getId());
			details.put("role", leader.getRole());
			details.put("isLeader", leader.isCandidate(candidate));
		}, () -> details.put("leaderId", "Unknown"));

		builder.withDetail("leaderElection", details);
	
<no_super_class>