code: def test_deprecated_params_without_new_param():
      class Foo:
          @deprecated_params(dict(baz=None, biz=None))
          def __init__(self, foo=1, bar=2):
              self.foo = foo
              self.bar = bar
  
          @deprecated_params(dict(operator=None))
          def foobar(self, op="+"):
              return eval("%s %s %s" % (self.foo, op, self.bar))
  
      prefix = fullname(Foo.__init__)[:-8]
  
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("always")
          f = Foo()
          assert f.foobar() == 3
          assert len(w) == 0
  
          f = Foo(foo=3, baz=5)
          assert not hasattr(f, "baz")
          assert len(w) == 1
          assert "``baz`` param of ``{}__init__`` is deprecated and will be ignored".format(
              prefix
          ) in str(
              w[0].message
          )
          del w[:]
  
          assert f.foobar(operator="*") == 5
          assert len(w) == 1
          assert "``operator`` param of ``{}foobar`` is deprecated and will be ignored".format(
              prefix
          ) in str(
              w[0].message
          )
  
file_path: h2o-3/h2o-py/tests/testdir_utils/pyunit_deprecations.py
imports: import os
  import re
  import sys
  import warnings
  from h2o.utils.metaclass import deprecated_params, deprecated_property, deprecated_fn, fullname
  from tests import pyunit_utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_deprecated_params_without_new_param() and returns: eval