def _input_wrap(prompt, default=None):
    """
    Run input() with formatted prompt, and return
    The while loop can be used to ensure correct output
    """
    understood = False
    while not understood:
        result = input(prompt.format(default=default)).lower().strip()
        if result in {'y', 'yes'}:
            return True
        if result in {'n', 'no'}:
            return False
        if not result:
            return default
        if result in {'quit', 'q', 'exit'}:
            raise RuntimeError('User quit.')
        if not isinstance(default, bool):
            return result
        print(
            "Error: answer not understood. You can 'quit' or hit ctrl+c to exit."
            )
