class_docstr: Decorator class to deprecate old functions.
  
  Refer to `deprecate` for details.
  
  See Also
  --------
  deprecate
class_docstr_tok: ["Decorator","class","to","deprecate","old","functions",".","Refer","to","`","deprecate","`","for","details",".","See","Also","--","--","--","--","deprecate"]
docstr: Decorator call.  Refer to ``decorate``.
docstr_tok: ["Decorator","call",".","Refer","to","``","decorate","``","."]
code: def __call__(self, func, *args, **kwargs):
      """
      Decorator call.  Refer to ``decorate``.
  
      """
      old_name = self.old_name
      new_name = self.new_name
      message = self.message
  
      if old_name is None:
          old_name = func.__name__
      if new_name is None:
          depdoc = "`%s` is deprecated!" % old_name
      else:
          depdoc = "`%s` is deprecated, use `%s` instead!" % (
              old_name,
              new_name,
          )
  
      if message is not None:
          depdoc += "\n" + message
  
      @functools.wraps(func)
      def newfunc(*args, **kwds):
          warnings.warn(depdoc, DeprecationWarning, stacklevel=2)
          return func(*args, **kwds)
  
      newfunc.__name__ = old_name
      doc = func.__doc__
      if doc is None:
          doc = depdoc
      else:
          lines = doc.expandtabs().split("\n")
          indent = _get_indent(lines[1:])
          if lines[0].lstrip():
              # Indent the original first line to let inspect.cleandoc()
              # dedent the docstring despite the deprecation notice.
              doc = indent * " " + doc
          else:
              # Remove the same leading blank lines as cleandoc() would.
              skip = len(lines[0]) + 1
              for line in lines[1:]:
                  if len(line) > indent:
                      break
                  skip += len(line) + 1
              doc = doc[skip:]
          depdoc = textwrap.indent(depdoc, " " * indent)
          doc = "\n\n".join([depdoc, doc])
      newfunc.__doc__ = doc
  
      return newfunc
  
imports: import os
  import sys
  import textwrap
  import types
  import re
  import warnings
  import functools
  import platform
  from numpy._core import ndarray
  from numpy._utils import set_module
  import numpy
label_desc: Use image node_id 2 for calling the _Deprecate obj's underlying member method code with example usage: obj.__call__(func) and returns: newfunc, func