def level_order(self) -> Iterator["BSP"]:
        """Iterate over this BSP's hierarchy in level order.

        .. versionadded:: 8.3
        """
        next = [self]  # type: List['BSP']
        while next:
            level = next  # type: List['BSP']
            next = []
            yield from level
            for node in level:
                next.extend(node.children)
def level_order ( self ) -> Iterator [ "BSP" ] : next = [ self ] while next : level = next next = [ ] yield from level for node in level : next . extend ( node . children )
Iterate over this BSP's hierarchy in level order.

        .. versionadded:: 8.3