def boolean(message, err='Please enter 1 (True) or 0 (False).'):
    """Command line input and error checking for boolean values (1 or 0).

    Args:
        message (str): The input message displayed in the command line.
        err (str, optional): The message displayed for an erroneous input.
            Defaults to "Please enter 1 (True) or 0 (False).".

    Returns:
        bool: The first sucessfully input boolean value.
    """
    while True:
        data = input(message)
        data = data.strip()
        if data == '':
            print('Please provide an input.')
            continue
        if data == '1':
            return True
        elif data == '0':
            return False
        print(err)
