'For each part of the path, walk down the tree of
subparsers, creating new ones if one doesn\'t already exist.'

def _get_subparser(self, path):

    for length in range(0, len(path)):
        parent_subparser = self.subparsers.get(tuple(path[0:length]), None)
        if (not parent_subparser):
            grandparent_subparser = self.subparsers[tuple(path[:(length - 1)])]
            new_parser = grandparent_subparser.add_parser(path[(length - 1)])
            parent_subparser = new_parser.add_subparsers(dest='subcommand')
            parent_subparser.required = True
            self.subparsers[tuple(path[0:length])] = parent_subparser
    return parent_subparser
