Deprecate a function

@param {Book|Output} book
@param {String} key: unique identitifer for the deprecated
@param {Function} fn
@param {String} msg: message to print when called
@return {Function}
320370
function deprecateMethod(book, key, fn, msg) {
    return function() {
        logNotice(book, key, msg);

        return fn.apply(this, arguments);
    };
}
1306387
def _deprecated_config_handler(self, func, msg, warning_class):
        
        @wraps(func)
        def config_handler(*args, **kwargs):
            warnings.warn(msg, warning_class)
            return func(*args, **kwargs)

        return config_handler
805193
def _deprecated(func):
    """"""
    @wraps(func)
    def with_warning(*args, **kwargs):
        warnings.warn(
            ('The %s method is deprecated and will be removed in v2.*.*' %
             func.__name__),
            DeprecationWarning
        )
        return func(*args, **kwargs)
    return with_warning
27857
function deleteFunction (f, from) {
        const re1 = new RegExp ('def ' + f + '[^\#]+', 'g')
        const re2 = new RegExp ('[\\s]+' + f + '\\(exchange\\)', 'g')
        return from.replace (re1, '').replace (re2, '')
    }
412257
def deprecated(message, stacklevel=2):  # pragma: no cover
    

    def _decorator(func):
        @wraps(func)
        def _func(*args, **kwargs):
            warnings.warn(
                "'{}' is deprecated. {}".format(func.__name__, message),
                category=DeprecationWarning,
                stacklevel=stacklevel
            )
            return func(*args, **kwargs)
        return _func
    return _decorator
718934
function(msg) {
      // eslint-disable-next-line no-console
      if (console.debug) {
        // eslint-disable-next-line no-console
        console.debug.apply(console, arguments);
      } else {
        // eslint-disable-next-line no-console
        console.log.apply(console, arguments);
      }
    }
775314
function(key, replacements) {
        var message = messageMap[key];

        if (replacements) {
            message = util.replaceText(message, replacements);
        }

        return message;
    }
819017
def deprecated(func):
    """"""

    @functools.wraps(func)
    def new_func(*args, **kwargs):
        if PY3K:
            func_code = func.__code__
        else:
            func_code = func.func_code

        warnings.warn_explicit(
            "Call to deprecated function {}.".format(func.__name__),
            category=DeprecationWarning,
            filename=func_code.co_filename,
            lineno=func_code.co_firstlineno + 1,
        )

        return func(*args, **kwargs)

    return new_func
48653
def add_warning(self, key, *args, **kwargs):
        
        self._deprecations[key] = (args, kwargs)
1203163
private static boolean isLegalMessageVarAlias(Node msgNode, String msgKey) {
    if (msgNode.isGetProp()
        && msgNode.isQualifiedName()
        && msgNode.getLastChild().getString().equals(msgKey)) {
      // Case: `foo.Thing.MSG_EXAMPLE = bar.OtherThing.MSG_EXAMPLE;`
      //
      // This kind of construct is created by Es6ToEs3ClassSideInheritance. Just ignore it; the
      // message will have already been extracted from the base class.
      return true;
    }

    if (msgNode.getGrandparent().isObjectPattern() && msgNode.isName()) {
      // Case: `var {MSG_HELLO} = x;
      //
      // It's a destructuring import. Ignore it if the name is the same. We compare against the
      // original name if possible because in modules, the NAME node will be rewritten with a
      // module-qualified name (e.g. `var {MSG_HELLO: goog$module$my$module_MSG_HELLO} = x;`).
      String aliasName =
          (msgNode.getOriginalName() != null) ? msgNode.getOriginalName() : msgNode.getString();
      if (aliasName.equals(msgKey)) {
        return true;
      }
    }

    // TODO(nickreid): Should `var MSG_HELLO = x.MSG_HELLO;` also be allowed?

    return false;
  }
1052309
function(key, handler, queue) {
		var translationHandler;
		if ( isNaN(key)) {
			return offKeyValue.apply(this, arguments);
		}
		else {
			translationHandler = singleReference.getAndDelete(handler, this, key);
			return offKeyValue.call(this, 'length',  translationHandler, queue);
		}
	}
1327806
def deprecated(msg=''):
    """"""
    @decorator.decorator
    def wrap(function, *args, **kwargs):
        if not kwargs.pop('disable_warning', False):
            warn(msg, DeprecationWarning)
        return function(*args, **kwargs)
    return wrap
228051
function (fn) {
      return function (exp, msg) {
        /*eslint-disable no-invalid-this*/
        // Set properties.
        this._$el = flag(this, "object");
        this._name = _elName(this._$el);

        // Flag message.
        if (msg) {
          flag(this, "message", msg);
        }

        // Invoke assertion function.
        fn.apply(this, arguments);
      };
    }
799560
def deprecated(function, instead):
    """"""

    # skip for classes, breaks doc generation
    if not isinstance(function, types.FunctionType):
        return function

    @wraps(function)
    def wrap(*args, **kwargs):
        warnings.warn("Deprecated, use %s instead" % instead,
                      PyGIDeprecationWarning)
        return function(*args, **kwargs)

    return wrap
788752
function deprecateRenamedMethod(book, key, instance, oldName, newName, msg) {
    msg = msg || ('"' + oldName + '" is deprecated, use "' + newName + '()" instead');
    var fn = objectPath.get(instance, newName);

    instance[oldName] = deprecateMethod(book, key, fn, msg);
}
563617
function getBook(args, kwargs) {
    var input = path.resolve(args[0] || process.cwd());
    var logLevel = kwargs.log;

    var fs = createNodeFS(input);
    var book = Book.createForFS(fs);

    return book.setLogLevel(logLevel);
}
649354
function (msg,verbosity)
		{
			if (!_debug || verbosity>_verbosity)
				return false;
			this.e.log.apply(this,[msg||'','debug',verbosity||0]);
			return self;
		}