code: def test_deprecated_f_param_is_alias_for_smoothing():
      ds = load_dataset(incl_test=True)
      te = H2OTargetEncoderEstimator(noise=0)
      te.train(y=ds.target, training_frame=ds.train)
      encoded = te.predict(ds.test)
      # print(encoded)
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("always")
          te_f = H2OTargetEncoderEstimator(noise=0, f=25, blending=True)
          assert len(w) == 1
          assert issubclass(w[0].category, H2ODeprecationWarning)
          assert "``f`` param of ``{}`` is deprecated".format(
              te_init_name
          ) in str(w[0].message)
  
      te_f.train(y=ds.target, training_frame=ds.train)
      encoded_f = te_f.predict(ds.test)
      # print(encoded_f)
      te_s = H2OTargetEncoderEstimator(
          noise=0, smoothing=25, blending=True
      )
      te_s.train(y=ds.target, training_frame=ds.train)
      encoded_s = te_s.predict(ds.test)
      # print(encoded_s)
      try:
          pu.compare_frames(encoded_f, encoded, 0, tol_numeric=1e-5)
          assert False, "should have raised"
      except AssertionError as ae:
          assert "should have raised" not in str(ae)
      assert pu.compare_frames(
          encoded_f, encoded_s, 0, tol_numeric=1e-5
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/targetencoder/pyunit_te_deprecated_params.py
imports: import os
  import sys
  import warnings
  import h2o
  from h2o.estimators import H2OTargetEncoderEstimator
  from h2o.exceptions import H2ODeprecationWarning
  from h2o.utils.metaclass import fullname
  from tests import pyunit_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_deprecated_f_param_is_alias_for_smoothing() without return types