'Gets a subparser added with the supplied name.
This is an extension to the standard argparse API.'

def get_subparser(self, name):

    subpasrsers_actions = [action for action in self._actions if isinstance(action, _SubParsersAction)]
    for action in subpasrsers_actions:
        for (choice, subparser) in action.choices.items():
            if (choice == name):
                return subparser
    return None
