code: def deprecated(func):
      """This is a decorator which can be used to mark functions
      as deprecated. It will result in a warning being emitted
      when the function is used.
  
      ## Usage examples ##
      @deprecated
      def my_func():
          pass
  
      @other_decorators_must_be_upper
      @deprecated
      def my_func():
          pass
      """
  
      @functools.wraps(func)
      def new_func(*args, **kwargs):
          warnings.warn_explicit(
              "Call to deprecated function %(funcname)s."
              % {
                  "funcname": func.__name__,
              },
              category=DeprecationWarning,
              filename=func.__code__.co_filename,
              lineno=func.__code__.co_firstlineno + 1,
          )
          return func(*args, **kwargs)
  
      return new_func
  
file_path: wandb/wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/decorators.py
imports: import functools
  import warnings
  import threading
  import sys
label_desc: Use image node_id 7 for calling a global function with example usage: deprecated(func) and returns: new_func, func