class_docstr: Decorator for deprecated functions or methods.
  
  :example::
      class Foo:
  
          def new_method(self, param=None):
              ...
              do_sth(param)
  
          @deprecated_function(replaced_by=new_method)
          def old_method(self, param=None):
              pass
class_docstr_tok: ["Decorator","for","deprecated","functions","or","methods",".",":","example",":",":","class","Foo",":","def","new_method","(","self",",","param=None",")",":","...","do_sth","(","param",")","@","deprecated_function","(","replaced_by=new_method",")","def","old_method","(","self",",","param=None",")",":","pass"]
docstr: :param msg: the deprecation message to print as a ``DeprecationWarning`` when the function is called.
  :param replaced_by: the optional function replacing the deprecated one.
      If provided, then the code from the legacy method can be deleted and limited to `pass`,
      as the call, with its arguments, will be automatically forwarded to this replacement function.
code: def __init__(self, msg=None, replaced_by=None):
      """
      :param msg: the deprecation message to print as a ``DeprecationWarning`` when the function is called.
      :param replaced_by: the optional function replacing the deprecated one.
          If provided, then the code from the legacy method can be deleted and limited to `pass`,
          as the call, with its arguments, will be automatically forwarded to this replacement function.
      """
      self._msg = msg
      self._replaced_by = replaced_by
  
imports: from h2o.utils.compatibility import *
  from functools import wraps
  import inspect
  import warnings
  from h2o.exceptions import H2ODeprecationWarning
label_desc: Use image node_id 1 to create a new _DeprecatedFunction object from inherited base classes: object with example: obj = _DeprecatedFunction(msg, replaced_by)