code: def subcommand_builder(self, command_name, description=None):
          
          def wrapper(decorated):
              subparser = self.subparsers.add_parser(command_name)
              func = decorated(subparser)
              subparser.set_defaults(func=func)
              subparser.description = description or func.__doc__
          return wrapper
docs: Decorate a function that builds a subcommand. Builders should accept a
          single argument (the subparser instance) and return the function to be
          run as the command.