from typing import Sequence
from typing import Callable
from typing import Any


def remove_if_possible(options: Sequence[str], predicate: Callable[[Any], bool]):
    """
    Removes all entries in options where the predicate is true,
    unless that would leave an empty list of options.
    """
    pred_vec = [predicate(option) for option in options]
    if any(pred_vec) and not all(pred_vec):
        options = [option for option, pred in zip(options, pred_vec) if not pred]
    return options