def leader_is_alive(self):
        """returns a tuple if the leader is alive and the currentleader"""
        currentleader = self.find_leader()
        if currentleader != self.me:
            if self.debug: self.logger.write("State", "Sending PING to %s" % str(currentleader))
            pingmessage = create_message(MSG_PING, self.me)
            successid = self.send(pingmessage, peer=currentleader)
            if successid < 0:
                self.replicas[currentleader] += 1
                return False, currentleader
        return True, currentleader
dataset/ETHPy150Open denizalti/concoord/concoord/replica.py/Replica.leader_is_alive/original