def METHOD_NAME(original_function, function_name):
    @wraps(original_function)
    def call_deprecated_function(*args, **kwargs):
        wrn_msg = f"""
                *************************************************************************
                Use `flax.linen.{function_name}` instead of `netket.nn.{function_name}`.
                *************************************************************************
        """
        warnings.warn(dedent(wrn_msg), category=FutureWarning, stacklevel=3)
        return original_function(*args, **kwargs)
    return call_deprecated_function