code: def test_deprecated_params_advanced_syntax():
      class Foo:
          @deprecated_params(
              dict(
                  duration_millis=(
                      lambda millis: dict(duration=millis, unit="ms"),
                      "duration_millis custom message",
                  )
              )
          )
          def __init__(self, duration=1, unit="s"):
              self.duration = duration
              self.unit = unit
  
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("always")
          f = Foo(duration_millis=600)
          assert f.duration == 600
          assert f.unit == "ms"
          assert len(w) == 1
          assert str(w[0].message) == "duration_millis custom 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 4 for calling a global function with example usage: test_deprecated_params_advanced_syntax() without return types