code: def deprecate_function(
      message: str, *, version: str
  ) -> Callable[[Callable[P, T]], Callable[P, T]]:
      """Decorator to mark a function as deprecated."""
  
      def decorate(function: Callable[P, T]) -> Callable[P, T]:
          @wraps(function)
          def wrapper(*args: P.args, **kwargs: P.kwargs) -> T:
              issue_deprecation_warning(
                  f"`{function.__name__}` is deprecated. {message}",
                  version=version,
              )
              return function(*args, **kwargs)
  
          wrapper.__signature__ = inspect.signature(function)  # type: ignore[attr-defined]
          return wrapper
  
      return decorate
  
file_path: polars/py-polars/polars/utils/deprecation.py
imports: from __future__ import annotations
  import inspect
  import warnings
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, TypeVar
  from polars.utils.various import find_stacklevel
label_desc: Use image node_id 2 for calling a global function with example usage: deprecate_function(message) and returns: decorate, wrapper, function