def leader(self) -> Optional[Leader]:
        """Return information about current cluster leader if the failsafe mode is active."""
        with self._lock:
            if self._last_update + self._dcs.ttl > time.time():
                return Leader('', '', RemoteMember(self._name, {'api_url': self._api_url,
                                                                'conn_url': self._conn_url,
                                                                'slots': self._slots}))
Return information about current cluster leader if the failsafe mode is active.
patroni/ha.py