def detect_mode(args):
    target = args[1]
    if (target == 'test'):
        return 'test'
    elif (target == 'adjust'):
        return 'adjust'
    else:
        print('error mode in args[1]')
        sys.exit(0)
def detect_mode(args):
    target = args[1]
    if (target == 'test'):
        return 'test'
    elif (target == 'adjust'):
        return 'adjust'
    else:
        print('error mode in args[1]')
        sys.exit(0)