Repeats the result of a 0-ary function until an `eof` item is reached.
    The `eof` item itself is not part of the resulting stream; by setting `use_is` to true,
    eof is checked by identity rather than equality.
    `times` and `interval` behave exactly like with `aiostream.create.repeat`.

def repeat_func_eof(func: Callable[[], Union[T, Awaitable[T]]], eof: Any, *, interval: float=0, use_is: bool=False) -> AsyncIterator[T]:
    """
    Repeats the result of a 0-ary function until an `eof` item is reached.
    The `eof` item itself is not part of the resulting stream; by setting `use_is` to true,
    eof is checked by identity rather than equality.
    `times` and `interval` behave exactly like with `aiostream.create.repeat`.
    """
    pred = (lambda item: item != eof) if not use_is else (lambda item: (item is not eof))
    base = repeat_func.raw(func, interval=interval)
    return cast(AsyncIterator[T], stream.takewhile.raw(base, pred))