I am able to get current contenders using election.lock._get_sorted_children() and respective identifiers using election.lock.contenders(). But election.lock.contenders() also sorts the list, so will election.lock.contenders()[0] always be the leader?
Note, election = zk.Election("/path", "uuid") where zk is the KazooClient
Is there any better way to verify the leader?