def _protected_mode_error_count_supplier()

in src/slurm_plugin/cluster_event_publisher.py [0:0]


    def _protected_mode_error_count_supplier(self, bootstrap_failure_nodes: List[SlurmNode]) -> Iterator:
        dynamic_nodes = []
        static_nodes = []
        other_nodes = []
        for node in bootstrap_failure_nodes:
            if node.is_bootstrap_timeout():
                (dynamic_nodes if isinstance(node, DynamicNode) else static_nodes).append(node)
            else:
                other_nodes.append(node)
        for error_type, nodes in [
            ("static-replacement-timeout-error", static_nodes),
            ("dynamic-resume-timeout-error", dynamic_nodes),
            ("other-bootstrap-error", other_nodes),
        ]:
            count = len(nodes)
            yield count, {
                "failure-type": error_type,
                "count": count,
                "nodes": self._generate_node_name_list(nodes),
            }