def METHOD_NAME(wrapped_, instance_, args_, kwargs_):
    msg = adapter.get_deprecated_msg(wrapped_, instance_)
    with warnings.catch_warnings():
        warnings.simplefilter(action, category)
        warnings.warn(msg, category=category, stacklevel=2)
    return wrapped_(*args_, **kwargs_)