<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_reduce(function: Callable[[Any, Any], Any] = None, *, init: Any = NONE):
 """ Decorator to wrap a function to return a Reduce operator. :param function: function to be wrapped :param init: optional initialization for state """

    _init = init

    def _build_reduce(function: Callable[[Any, Any], Any]):
        @wraps(function)
        def _wrapper(init=NONE) -> Reduce:
            init = _init if init is NONE else init
            if init is NONE:
                raise TypeError('init argument has to be defined')
            return Reduce(function, init=init)
        return _wrapper

    if function:
        return _build_reduce(function)

    return _build_reduce