Run `func` against all the subcommands attached to our root
        command.

def map_subcommands(self, func):
        """ Run `func` against all the subcommands attached to our root
        command. """

        def crawl(cmd):
            for sc in cmd.subcommands.values():
                yield from crawl(sc)
            yield cmd
        return map(func, crawl(self.root_command))