code: def _assert_param_already_set_warning(param, warns):
      messages = [
          str(w.message) for w in warns if w.category == UserWarning
      ]
      assert any(
          "`%s` parameter has been already set and had a different value in `train` method."
          % param
          in m
          for m in messages
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/common/pyunit_train_params_validation.py
imports: import sys
  import warnings
  import h2o
  from h2o.estimators.gbm import H2OGradientBoostingEstimator
  from tests import pyunit_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_param_already_set_warning(param, warns) without return types