code: def deprecated(
      end_version: str, *, reason: str = "", replaced_by: str = ""
  ) -> Callable:
      """
      Deprecate a function or method and raise a `DeprecationWarning`.
  
      The `@deprecated` decorator is used to deprecate functions and methods. Several cases are supported. For example
      one can use it to deprecate a function that has become redundant or rename a function. The following code examples
      provide different use cases of how to use decorator.
  
      .. code-block:: python
  
        @deprecated("0.1.5", replaced_by="sum")
        def simple_addition(a, b):
            return a + b
  
      :param end_version: Release version of removal.
      :param reason: Additional deprecation reason.
      :param replaced_by: Function that replaces deprecated function.
      """
  
      def decorator(function):
          reason_msg = "\n" + reason if reason else reason
          replaced_msg = (
              f" It will be replaced by '{replaced_by}'."
              if replaced_by
              else replaced_by
          )
          deprecated_msg = f"Function '{function.__name__}' is deprecated and will be removed in future release {end_version}."
  
          @wraps(function)
          def wrapper(*args, **kwargs):
              warnings.simplefilter(
                  "always", category=DeprecationWarning
              )
              warnings.warn(
                  deprecated_msg + replaced_msg + reason_msg,
                  category=DeprecationWarning,
                  stacklevel=2,
              )
              warnings.simplefilter(
                  "default", category=DeprecationWarning
              )
              return function(*args, **kwargs)
  
          return wrapper
  
      return decorator
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import math
  import os
  import shutil
  import sys
  import tarfile
  import warnings
  import zipfile
  from functools import wraps
  from inspect import signature
  from typing import TYPE_CHECKING, Callable, List, Dict, Optional, Tuple, Union
  import numpy
  import six
  from scipy.special import gammainc
  from tqdm.auto import tqdm
  from art import config
label_desc: Use image node_id 1 for calling a global function with example usage: deprecated(end_version) and returns: decorator, wrapper, function