def pop_until(sequence, condition=bool):
    """
    Look for item in `sequence` that passes `condition`, popping away others.

    When sequence is empty, propagates the `IndexError`.
    """
    from python_toolbox import cute_iter_tools
    for item in cute_iter_tools.iterate_pop(sequence):
        if condition(item):
            return item
