def next_layout(self, name: str | None = None) -> None:
        """
        Switch to the next layout.

        Parameters
        ==========
        name :
            Group name. If not specified, the current group is assumed
        """
        if name is not None:
            group = self.groups_map[name]
        else:
            group = self.current_group
        group.use_next_layout()

        Switch to the next layout.

        Parameters
        ==========
        name :
            Group name. If not specified, the current group is assumed
        
libqtile/core/manager.py