code: def deprecated(alternative=None, since=None, impact=None):
      """Annotation decorator for marking APIs as deprecated in docstrings and raising a warning if
      called.
  
      Args:
          alternative: (Optional string) The name of a superseded replacement function, method,
              or class to use in place of the deprecated one.
          since: (Optional string) A version designator defining during which release the function,
              method, or class was marked as deprecated.
          impact: (Optional boolean) Indication of whether the method, function, or class will be
              removed in a future release.
  
      Returns:
          Decorated function.
      """
  
      def deprecated_decorator(func):
          since_str = f" since {since}" if since else ""
          impact_str = (
              impact
              if impact
              else "This method will be removed in a future release."
          )
  
          notice = "``{qual_function_name}`` is deprecated{since_string}. {impact}".format(
              qual_function_name=".".join(
                  [func.__module__, func.__qualname__]
              ),
              since_string=since_str,
              impact=impact_str,
          )
          if alternative is not None and alternative.strip():
              notice += f" Use ``{alternative}`` instead."
  
          @wraps(func)
          def deprecated_func(*args, **kwargs):
              warnings.warn(
                  notice, category=FutureWarning, stacklevel=2
              )
              return func(*args, **kwargs)
  
          if func.__doc__ is not None:
              deprecated_func.__doc__ = (
                  ".. Warning:: " + notice + "\n" + func.__doc__
              )
  
          return deprecated_func
  
      return deprecated_decorator
  
file_path: mlflow/mlflow/utils/annotations.py
imports: import inspect
  import types
  import warnings
  from functools import wraps
  from typing import Any, Callable, TypeVar, Union
label_desc: Use image node_id 4 for calling a global function with example usage: deprecated(alternative, since, impact) and returns: deprecated_decorator, deprecated_func, func