code: def _deprecated_function_for(old_function_name, function):
      @functools.wraps(function)
      def _deprecated_function(*args, **kwargs):
          warnings.warn(
              "The `{}` function is deprecated. Use `{}` instead".format(
                  old_function_name, function.__name__
              ),
              DeprecationWarning,
          )
          return function(*args, **kwargs)
  
      return _deprecated_function
  
file_path: gpytorch/gpytorch/utils/deprecation.py
imports: import functools
  import warnings
  from unittest.mock import MagicMock
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: _deprecated_function_for(old_function_name, function) and returns: _deprecated_function, function