code: def deprecated_function(reason="", version="", name=None):
      """
      Decorator to mark a function as deprecated.
      """
  
      def decorator(func):
          @wraps(func)
          def wrapper(*args, **kwargs):
              warn_deprecated(
                  name or func.__name__, reason, version, stacklevel=3
              )
              return func(*args, **kwargs)
  
          return wrapper
  
      return decorator
  
file_path: catboost/contrib/python/redis/py3/redis/utils.py
imports: import logging
  import sys
  from contextlib import contextmanager
  from functools import wraps
  from typing import Any, Dict, Mapping, Union
label_desc: Use image node_id 9 for calling a global function with example usage: deprecated_function(reason, version, name) and returns: decorator, wrapper, func