def _attach_subcommands(self):
if self.subcommands:<EOL><INDENT>self.subparsers = self.parser.add_subparsers()<EOL>for subcommand in self.subcommands:<EOL><INDENT>subparser = self.subparsers.add_parser(subcommand.name,<EOL>help=subcommand.title)<EOL>if subcommand.handler:<EOL><INDENT>self._register_handler(subparser, subcommand.handler)<EOL><DEDENT>subcommand._init(subparser)<EOL><DEDENT><DEDENT>
Create a subparser and add the registered commands to it.

        This will also call ``_init`` on each subcommand (in turn invoking its
        ``_attach_subcommands`` method).