def get_args():
    parser = argparse.ArgumentParser(prog='PruneAndSearch', description='Implementation of the Prune and Search Algorithm. ', usage='python main.py { --rand RAND | --file FILE | --list LIST | --test [--trial TRIAL] [--vals VALS] [--verb] }  [--seed SEED]')
    parser.add_argument('-n', '--small', default=None, type=int, help='The N-th smallest element to find in the values.    (default: {})'.format('MEDIAN'))
    parser.add_argument('-r', '--rand', default=None, type=int, help='Generate N random numbers in range 1 - 10,000.      (default: {})'.format('DISABLED'))
    parser.add_argument('-f', '--file', default=None, help='Read in a list from a text file.                    (default: {})'.format('DISABLED'))
    parser.add_argument('-l', '--list', default=None, type=int, nargs='+', help='Provide input as a list from the command line.      (default: {})'.format('DISABLED'))
    parser.add_argument('-x', '--seed', default=123, type=int, help='Seed for Numpy RNG.                                 (default: {})'.format(123))
    parser.add_argument('-t', '--test', default=False, action='store_true', help='Perform a timed test, random trials T times.        (default: {})'.format('DISABLED'))
    parser.add_argument('-T', '--trial', default=1000, type=int, help='Number of timed trials to conduct.                  (default: {})'.format(1000))
    parser.add_argument('-v', '--vals', default=100, type=int, help='Number of random values to during testing.          (default: {})'.format(100))
    parser.add_argument('-V', '--verb', default=False, action='store_true', help='Verbose output.                                     (default: {})'.format('DISABLED'))
    args = parser.parse_args()
    count = 0
    if (args.rand != None):
        count += 1
    if (args.file != None):
        count += 1
    if (args.list != None):
        count += 1
    if args.test:
        count += 1
    if (count > 1):
        print('\n[ERROR] Too many arguments provided!!\n')
    if (count == 0):
        print('\n[ERROR] No arguments provided!!\n')
    if (count != 1):
        parser.print_help()
        print('\n Please provide the program with an argument using one of the following:\n')
        print('\t python main.py --rand 20')
        print('\t python main.py --file a.data')
        print('\t python main.py --list 1 2 3 4 5 6 7 8')
        print('\t python main.py --test --trial 300 --vals 100 --verb --seed 123')
        print(' ')
        exit()
    return args
def get_args():
    parser = argparse.ArgumentParser(prog='PruneAndSearch', description='Implementation of the Prune and Search Algorithm. ', usage='python main.py { --rand RAND | --file FILE | --list LIST | --test [--trial TRIAL] [--vals VALS] [--verb] }  [--seed SEED]')
    parser.add_argument('-n', '--small', default=None, type=int, help='The N-th smallest element to find in the values.    (default: {})'.format('MEDIAN'))
    parser.add_argument('-r', '--rand', default=None, type=int, help='Generate N random numbers in range 1 - 10,000.      (default: {})'.format('DISABLED'))
    parser.add_argument('-f', '--file', default=None, help='Read in a list from a text file.                    (default: {})'.format('DISABLED'))
    parser.add_argument('-l', '--list', default=None, type=int, nargs='+', help='Provide input as a list from the command line.      (default: {})'.format('DISABLED'))
    parser.add_argument('-x', '--seed', default=123, type=int, help='Seed for Numpy RNG.                                 (default: {})'.format(123))
    parser.add_argument('-t', '--test', default=False, action='store_true', help='Perform a timed test, random trials T times.        (default: {})'.format('DISABLED'))
    parser.add_argument('-T', '--trial', default=1000, type=int, help='Number of timed trials to conduct.                  (default: {})'.format(1000))
    parser.add_argument('-v', '--vals', default=100, type=int, help='Number of random values to during testing.          (default: {})'.format(100))
    parser.add_argument('-V', '--verb', default=False, action='store_true', help='Verbose output.                                     (default: {})'.format('DISABLED'))
    args = parser.parse_args()
    count = 0
    if (args.rand != None):
        count += 1
    if (args.file != None):
        count += 1
    if (args.list != None):
        count += 1
    if args.test:
        count += 1
    if (count > 1):
        print('\n[ERROR] Too many arguments provided!!\n')
    if (count == 0):
        print('\n[ERROR] No arguments provided!!\n')
    if (count != 1):
        parser.print_help()
        print('\n Please provide the program with an argument using one of the following:\n')
        print('\t python main.py --rand 20')
        print('\t python main.py --file a.data')
        print('\t python main.py --list 1 2 3 4 5 6 7 8')
        print('\t python main.py --test --trial 300 --vals 100 --verb --seed 123')
        print(' ')
        exit()
    return args