if _name == "<lambda>":
                        _name = set_name
            def finalize(_: Any, new_doc: str) -> Any:  # type: ignore
                """Finalize the property."""
                return _deprecated_property(
                    fget=obj.fget, fset=obj.fset, fdel=obj.fdel, doc=new_doc
                )
        else:
            if not _obj_type:
                _obj_type = "function"
            wrapped = obj
            _name = _name or obj.__name__  # type: ignore
            old_doc = wrapped.__doc__
            def finalize(  # type: ignore
                wrapper: Callable[..., Any], new_doc: str
            ) -> T:
                """Wrap the wrapped function using the wrapper and update the docstring.
                Args:
                    wrapper: The wrapper function.
                    new_doc: The new docstring.
                Returns:
                    The wrapped function.
                """
                wrapper = functools.wraps(wrapped)(wrapper)
                wrapper.__doc__ = new_doc
                return wrapper
        def emit_warning() -> None:
            """Emit the warning."""
            _warn_deprecated(
                since,
                message=_message,
                name=_name,
                alternative=_alternative,
                pending=_pending,
                obj_type=_obj_type,
                addendum=_addendum,
                removal=removal,
            )
        def warning_emitting_wrapper(*args: Any, **kwargs: Any) -> Any:
            """Wrapper for the original wrapped callable that emits a warning.
            Args:
                *args: The positional arguments to the function.
                **kwargs: The keyword arguments to the function.
            Returns:
                The return value of the function being wrapped.
            """
            emit_warning()