def _section_permutations( parsed_section_names: Sequence[ParsedSectionName], ) -> Generator[Tuple[SectionPlugin, ...], None, None]: if not parsed_section_names: yield () return if len(parsed_section_names) >= 1: for section_name in agent_based_register.get_section_producers( parsed_section_names[0]): for perm in _section_permutations(parsed_section_names[1:]): yield (agent_based_register.get_section_plugin(section_name), ) + perm
def _needs_redetection(section_name: SectionName) -> bool: section = agent_based_register.get_section_plugin(section_name) return len( agent_based_register.get_section_producers( section.parsed_section_name)) > 1