def ensure_unique_name(self, cluster: 'Cluster') -> None:
        """A helper method to prevent splitbrain from operator naming error.

        :param cluster: a PostgreSQL or MPP implementation of :class:`Cluster`.
        """
        from patroni.dcs import Member

        if not cluster:
            return
        member = cluster.get_member(self.config['name'], False)
        if not isinstance(member, Member):
            return
        try:
            # Silence annoying WARNING: Retrying (...) messages when Patroni is quickly restarted.
            # At this moment we don't have custom log levels configured and hence shouldn't lose anything useful.
            self.logger.update_loggers({'urllib3.connectionpool': 'ERROR'})
            _ = self.request(member, endpoint="/liveness", timeout=3)
            logger.fatal("Can't start; there is already a node named '%s' running", self.config['name'])
            sys.exit(1)
        except Exception:
            self.logger.update_loggers({})
A helper method to prevent splitbrain from operator naming error.

        :param cluster: a PostgreSQL or MPP implementation of :class:`Cluster`.
        
patroni/__main__.py