def slots(self) -> Dict[str, int]:
        """Get replication slots state.

        ..note::
            Since this methods is supposed to be used only by the leader and only to publish state of
            replication slots to DCS so that other nodes can advance LSN on respective replication slots,
            we are also adding our own name to the list. All slots that shouldn't be published to DCS
            later will be filtered out by :meth:`~Cluster.maybe_filter_permanent_slots` method.

        :returns: A :class:`dict` object with replication slot names and LSNs as absolute values.
        """
        return {**(self._cluster_info_state_get('slots') or {}),
                slot_name_from_member_name(self.name): self.last_operation()} \
            if self.can_advance_slots else {}
Get replication slots state.

        ..note::
            Since this methods is supposed to be used only by the leader and only to publish state of
            replication slots to DCS so that other nodes can advance LSN on respective replication slots,
            we are also adding our own name to the list. All slots that shouldn't be published to DCS
            later will be filtered out by :meth:`~Cluster.maybe_filter_permanent_slots` method.

        :returns: A :class:`dict` object with replication slot names and LSNs as absolute values.
        
patroni/postgresql/__init__.py