code: def map_subcommands(self, func):
          
  
          def crawl(cmd):
              for sc in cmd.subcommands.values():
                  yield from crawl(sc)
              yield cmd
          return map(func, crawl(self.root_command))
docs: Run `func` against all the subcommands attached to our root
          command.