class_docstr: Decorator to mark a function or class as deprecated.
  
  Issue a warning when the function is called/the class is instantiated and
  adds a warning to the docstring.
  
  The optional extra argument will be appended to the deprecation message
  and the docstring. Note: to use this with the default value for extra, put
  in an empty of parentheses:
  
  >>> from sklearn.utils import deprecated
  >>> deprecated() # doctest: +ELLIPSIS
  <sklearn.utils.deprecation.deprecated object at ...>
  
  >>> @deprecated()
  ... def some_function(): pass
docstr: Decorate function fun
docstr_tok: ["Decorate","function","fun"]
code: def _decorate_fun(self, fun):
      """Decorate function fun"""
  
      msg = "Function %s is deprecated" % fun.__name__
      if self.extra:
          msg += "; %s" % self.extra
  
      def wrapped(*args, **kwargs):
          warnings.warn(msg, category=DeprecationWarning)
          return fun(*args, **kwargs)
  
      wrapped.__name__ = fun.__name__
      wrapped.__dict__ = fun.__dict__
      wrapped.__doc__ = self._update_doc(fun.__doc__)
  
      return wrapped
  
imports: import warnings
label_desc: Use image node_id 4 for calling the deprecated obj's underlying member method code with example usage: obj._decorate_fun(fun) and returns: wrapped, fun