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"]
code: def __call__(self, fn):
      msg = (
          self._msg
          if self._msg is not None
          else "``{}`` is deprecated, please use ``{}`` instead.".format(
              fullname(fn), fullname(self._replaced_by)
          )
          if self._replaced_by is not None
          else "``{}`` is deprecated.".format(fullname(fn))
      )
      fn.__doc__ = (
          "{msg}\n\n{doc}".format(msg=msg, doc=fn.__doc__)
          if fn.__doc__ is not None
          else msg
      )
      call_fn = self._replaced_by or fn
  
      @wraps(fn)
      def wrapper(*args, **kwargs):
          warnings.warn(msg, H2ODeprecationWarning, 2)
          return call_fn(*args, **kwargs)
  
      return wrapper
  
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 2 for calling the _DeprecatedFunction obj's underlying member method code with example usage: obj.__call__(fn) and returns: wrapper, call_fn