def add_subcommands(self, command, *args, **kwargs):
subcommands = kwargs.pop('<STR_LIT>', None)<EOL>try:<EOL><INDENT>cmd = self[command]<EOL><DEDENT>except KeyError:<EOL><INDENT>if '<STR_LIT>' not in kwargs:<EOL><INDENT>kwargs['<STR_LIT>'] = self.formatter_class<EOL><DEDENT>cmd = self.add_parser(command, *args, **kwargs)<EOL>args, kwargs = tuple(), dict()<EOL><DEDENT>if subcommands is not None:<EOL><INDENT>kwargs = subcommands<EOL><DEDENT>child = CommandDecorator(<EOL>argparser = self.argparser,<EOL>commands  = cmd.add_subparsers(*args, **kwargs),<EOL>parent = self,<EOL>name   = command,<EOL>)<EOL>self.children.append(child)<EOL>return child<EOL>
add subcommands.

        If command already defined, pass args and kwargs to add_subparsers()
        method, else to add_parser() method.  This behaviour is for convenience,
        because I mostly use the sequence:

        >>> p = parser.add_parser('foo', help="some help")
        >>> subparser = p.add_subparsers()

        If you want to configure your sub_parsers, you can do it with:

        >>> command.add_subcommands('cmd',
                help = "cmd help"
                subcommands = dict(
                    title = "title"
                    description = "subcommands description"
                )
            )