def METHOD_NAME(func):
    object_type = "class" if inspect.isclass(func) else "function"
    message = "Call to deprecated {} {!r}".format(
        object_type, func_name or func.__name__
    )
    if reason is not None:
        message += f" ({dedent(reason)})"
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        warnings.warn(message, category=FutureWarning, stacklevel=2)
        return func(*args, **kwargs)
    return wrapper