invert_disallowed_to_allowed

invert_disallowed_to_allowed(disallowed_speaker_transitions_dict: dict[str, list[Agent]], agents: list[Agent]) -> dict[str, list[Agent]]

Invert the disallowed_speaker_transitions_dict to form the allowed_speaker_transitions_dict.
Start with a fully connected allowed_speaker_transitions_dict of all agents. Remove edges from the fully connected allowed_speaker_transitions_dict according to the disallowed_speaker_transitions_dict to form the allowed_speaker_transitions_dict.

Parameters:
NameDescription
disallowed_speaker_transitions_dictA dictionary of keys and list as values.

The keys are the names of the agents, and the values are the names of the agents that the key agent cannot transition to.

Type: dict[str, list[Agent]]
agentsA list of Agents

Type: list[Agent]
Returns:
TypeDescription
dict[str, list[Agent]]allowed_speaker_transitions_dict: A dictionary of keys and list as values. The keys are the names of the agents, and the values are the names of the agents that the key agent can transition to.