def prompt_input(prompt, default=None, interrupt=None):
    """
    Prompt the user for [y]es/[n]o input, return a boolean accordingly.

    Parameters
    ----------
    prompt : str
        The prompt text presented on-screen to the user.
    default : {'y', 'yes', 'n', 'no'}, optional
        The default response if the user presses return without entering
        any text. if `None` (default), re-prompt the user until input is
        provided.
    interrupt : {'y', 'yes', 'n', 'no'}, optional
        The default response if a `KeyboardInterrupt` is raised
        (`CTRL + c` from the command line, "interrupt kernel/runtime"
        from a Jupyter/Colab notebook). If `None` (default), the
        exception is raised. Use with caution to avoid unexpected
        behavior and improperly silencing errors.

    Returns
    -------
    bool
        The boolean value corresponding to the user input (`True` for
        `'y'`/`'yes'`, `False` for `'n'`/`'no'`).

    Notes
    -----
    The `default` value is reflected in the casing of options displayed
    after the `prompt` text (e.g., "`[Y/n]`" if `default="yes"`)
    """
    response_values = {
        'yes': True,
        'y': True,
        'no': False,
        'n': False
    }
    if interrupt is not None:
        interrupt = interrupt.lower()
        if interrupt not in response_values.keys():
            raise ValueError(
                f"'interrupt' must be one of {tuple(response_values.keys())}"
            )
    if default is not None:
        default = default.lower()
        try:
            default_value = response_values[default]
        except KeyError as e:
            raise ValueError(
                f"'default' must be one of: {tuple(response_values.keys())}"
            ) from e
        response_values[''] = default_value
        opts = '[Y/n]' if default_value else '[y/N]'
    else:
        opts = '[y/n]'

    while True:
        try:
            response = input(f"{prompt}\n{opts} ").lower()
            return response_values[response]
        except KeyboardInterrupt:
            if interrupt is not None:
                return response_values[interrupt]
            raise
        except KeyError:
            pass