code: def deprecated_model_function(function, old_name):
      def _function_wrapper(*args, **kwargs):
          """Deprecated: use :meth:`in_out_tensors`."""
  
          warnings.warn(
              f"The '{old_name}' method is deprecated, use 'in_out_tensors' instead.",
              DeprecationWarning,
              stacklevel=2,
          )
  
          return function(*args, **kwargs)
  
      return _function_wrapper
  
file_path: stellargraph/stellargraph/layer/misc.py
imports: import tensorflow
  from tensorflow.keras.layers import Layer
  from tensorflow.keras import backend
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: deprecated_model_function(function, old_name) and returns: _function_wrapper, function