def walk_commands(self):
        """An iterator that recursively walks through this cog's commands and subcommands."""
        from .core import GroupMixin
        for command in self.__cog_commands__:
            if command.parent is None:
                yield command
                if isinstance(command, GroupMixin):
                    yield from command.walk_commands()
An iterator that recursively walks through this cog's commands and subcommands.