def __init__(self, leader: str, quorum: int, voters: Collection[str],
                 numsync: int, sync: Collection[str], numsync_confirmed: int,
                 active: Collection[str], sync_wanted: int, leader_wanted: str) -> None:
        """Instantiate :class:``QuorumStateResolver`` based on input parameters.

        :param leader: name of the leader, according to the ``/sync`` key.
        :param quorum: ``quorum`` value from the ``/sync`` key, the minimal number of nodes we need see
                        when doing the leader race.
        :param voters: ``sync_standby`` value from the ``/sync`` key, set of node names we will be
                       running the leader race against.
        :param numsync: the number of synchronous nodes from the ``synchronous_standby_names``.
        :param sync: Set of node names listed in the ``synchronous_standby_names``.
        :param numsync_confirmed: the number of nodes that are confirmed to reach "safe" LSN after
                                  they were added to the ``synchronous_standby_names``.
        :param active: set of node names that are replicating from the primary (according to ``pg_stat_replication``)
                       and are eligible to be listed in ``synchronous_standby_names``.
        :param sync_wanted: desired number of synchronous nodes
                            (``synchronous_node_count`` from the global configuration).
        :param leader_wanted: the desired leader (could be different from the *leader* right after a failover).

        """
        self.leader = leader
        self.quorum = quorum
        self.voters = CaseInsensitiveSet(voters)
        self.numsync = min(numsync, len(sync))  # numsync can't be bigger than number of listed synchronous nodes.
        self.sync = CaseInsensitiveSet(sync)
        self.numsync_confirmed = numsync_confirmed
        self.active = CaseInsensitiveSet(active)
        self.sync_wanted = sync_wanted
        self.leader_wanted = leader_wanted
Instantiate :class:``QuorumStateResolver`` based on input parameters.

        :param leader: name of the leader, according to the ``/sync`` key.
        :param quorum: ``quorum`` value from the ``/sync`` key, the minimal number of nodes we need see
                        when doing the leader race.
        :param voters: ``sync_standby`` value from the ``/sync`` key, set of node names we will be
                       running the leader race against.
        :param numsync: the number of synchronous nodes from the ``synchronous_standby_names``.
        :param sync: Set of node names listed in the ``synchronous_standby_names``.
        :param numsync_confirmed: the number of nodes that are confirmed to reach "safe" LSN after
                                  they were added to the ``synchronous_standby_names``.
        :param active: set of node names that are replicating from the primary (according to ``pg_stat_replication``)
                       and are eligible to be listed in ``synchronous_standby_names``.
        :param sync_wanted: desired number of synchronous nodes
                            (``synchronous_node_count`` from the global configuration).
        :param leader_wanted: the desired leader (could be different from the *leader* right after a failover).

        
patroni/quorum.py