def bool_string(val):
    """ String to bool parser for argparse ArgumentParser.  """
    if val.lower() in ['t', 'true', 'y', 'yes']:
        return True
    elif val.lower() in ['f', 'false', 'n', 'no']:
        return False
    else:
        raise Exception('Please use t/true or f/false for boolean parameters.')