code: def deprecated(date, instructions, warn_once=True):
      """Decorator marking function or method as deprecated.
  
      Note: this function does not currently support deprecation of classes. To
      perform such deprecation, decorate its constructor instead.
  
      Args:
        date: String date at which function will be removed, or None.
        instructions: Instructions on updating use of deprecated code.
        warn_once: Whether only one warning should be emitted for multiple calls to
          deprecated symbol.
  
      Returns:
        Decorated function or method.
      """
  
      def deprecated_wrapper(func):
          _validate_callable(func)
  
          @functools.wraps(func)
          def new_func(*args, **kwargs):
              if _should_warn(func, warn_once=warn_once):
                  call_loc = _call_location()
                  func_name = getattr(
                      func, "__qualname__", func.__name__
                  )
                  func_module = func.__module__
                  removed_at = (
                      f"after {date}" if date else "in a future version"
                  )
                  message = (
                      f"From {call_loc}: {func_name} (from {func_module}) is deprecated "
                      f"and will be removed {removed_at}. Instructions for updating:\n"
                      + instructions
                  )
                  warn_deprecated(message)
              return func(*args, **kwargs)
  
          return new_func
  
      return deprecated_wrapper
  
file_path: tfx/tfx/utils/deprecation_utils.py
imports: import functools
  import inspect
  import warnings
label_desc: Use image node_id 4 for calling a global function with example usage: deprecated(date, instructions, warn_once) and returns: deprecated_wrapper, new_func, func