def __init__(
      self,
      model: language_model.LanguageModel,
      memory: associative_memory.AssociativeMemory,
      voters: Sequence[agent.GenerativeAgent],
      candidates: Sequence[str],
      clock_now: Callable[[], datetime.datetime],
      verbose: bool = False,
      measurements: measurements_lib.Measurements | None = None,
      channel: str = DEFAULT_CHANNEL_NAME,
  ):
    """Initializes the election tracker.

    Args:
      model: The language model to use.
      memory: The memory to use.
      voters: The agent voters.
      candidates: The candidates in the election.
      clock_now: Function to call to get current time. Used for logging.
      verbose: Whether to print verbose messages.
      measurements: Optional object to publish data from the elections.
      channel: Channel in measurements to publish to.
    """
    self._model = model
    self._memory = memory
    self._voters = voters
    self._candidates = candidates
    self._clock_now = clock_now
    self._verbose = verbose
    self._measurements = measurements
    self._channel = channel

    self._voter_names = [voter.name for voter in self._voters]
    self._vote_count = {candidate: 0 for candidate in self._candidates}
    self._citizens_who_already_voted = set()

    self._voter_by_name = {voter.name: voter for voter in self._voters}
    self._state = 'Polls are not open yet.'
    self._partial_states = None
    self._history = []

    self._polls_open = False
    self._winner_declared = False
    self._timestep = 0
Initializes the election tracker.

    Args:
      model: The language model to use.
      memory: The memory to use.
      voters: The agent voters.
      candidates: The candidates in the election.
      clock_now: Function to call to get current time. Used for logging.
      verbose: Whether to print verbose messages.
      measurements: Optional object to publish data from the elections.
      channel: Channel in measurements to publish to.
    
examples/deprecated/village/components/elections.py