from typing import Callable


def to_notifier(observer) -> Callable:
    """Creates a notification callback from an observer.

    Returns the action that forwards its input notification to the
    underlying observer."""

    def func(notifier):
        return notifier.accept(observer)
    return func