def METHOD_NAME():
    try:
        func_name = lambda f: f.__module__ + "." + f.__qualname__
        message = f"Function {func_name(func)} is deprecated."
        if replacement:
            message += f" Prefer {func_name(replacement)} instead."
    except AttributeError:
        message = f"Function {func} is deprecated."
        if replacement:
            message += f" Prefer {replacement} instead."
    logger(message)