def build_sink_async(coro=None, *, mode=None, unpack: bool = False):
    """ Decorator to wrap a coroutine to return a SinkAsync subscriber.

    :param coro: coroutine to be wrapped
    :param mode: behavior when a value is currently processed
    :param unpack: value from emits will be unpacked (*value)
    """
    _mode = mode

    def _build_sink_async(coro):
        @wraps(coro)
        def _wrapper(*args, mode=None, **kwargs) -> SinkAsync:
            if 'unpack' in kwargs:
                raise TypeError('"unpack" has to be defined by decorator')
            if mode is None:
                mode = MODE.CONCURRENT if _mode is None else _mode
            return SinkAsync(coro, *args, mode=mode, unpack=unpack, **kwargs)
        return _wrapper

    if coro:
        return _build_sink_async(coro)

    return _build_sink_async
Decorator to wrap a coroutine to return a SinkAsync subscriber.

    :param coro: coroutine to be wrapped
    :param mode: behavior when a value is currently processed
    :param unpack: value from emits will be unpacked (*value)