def get_confirmation(warningtext):
    """
    Prints a warning message and asks for user confirmation

    Return Values:
        True: User selected Yes
        False: User selected No

    """
    print()
    print(warningtext)
    while True:
        try:
            user_input = input("Please confirm (Y/N): ")
        except:
            user_input = ''
        if user_input.lower() == 'y' or user_input.lower() == 'yes':
            return True
        elif user_input.lower() == 'n' or user_input.lower() == 'no':
            return False

        print("The option: " + str(user_input) + " : is not a valid input")
        print("Valid options: [Y]es or [N]o")