code: def deprecated(alternate):
      def wrapper(func, alternate=alternate):
          msg = "'{0}' is deprecated.".format(func.__name__)
          if alternate is not None:
              msg += " Use '{0}' instead.".format(alternate)
  
          @wraps(func)
          def f(*args, **kwargs):
              deprecation_warning(msg)
              return func(*args, **kwargs)
  
          return f
  
      return wrapper
  
imports: import warnings
  from functools import wraps
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: deprecated(alternate) and returns: wrapper, f, func