import functools
import warnings


def deprecate(new_func):
    """Wrapper for deprecated functions to raise warning"""

    @functools.wraps(new_func)
    def wrapper(*args, **kwargs):
        warnings.warn(
            f"This function is deprecated and will be removed. Use {new_func.__name__} instead.",
            DeprecationWarning,
        )
        return new_func(*args, **kwargs)

    return wrapper