def get_main_app_sub_parser(parent_parser):
    """
    Creates and adds a sub_parser to parent_parser.
    Returns the sub_parser

    :param parent_parser: Parser to add the sub_parser to
    :type parent_parser: argparse.ArgumentParser
    :return: Sub Parser
    :rtype: argparse.ArgumentParser
    """
    sub_parser = parent_parser.add_subparsers(title='subcommands',
        description='one of these subcommands must be provided', metavar='',
        dest='cmd')
    return sub_parser
