code: def test_algo_parameter_can_be_applied_only_to_a_specific_algo():
      ds = import_dataset()
      aml = H2OAutoML(
          project_name="py_specific_algo_param",
          algo_parameters=dict(GBM__monotone_constraints=dict(AGE=1)),
          max_models=6,
          seed=1,
      )
      aml.train(y=ds.target, training_frame=ds.train)
      model_names = get_partitioned_model_names(aml.leaderboard).all
      models_supporting_monotone_constraints = [
          n for n in model_names if re.match(r"GBM|XGBoost", n)
      ]
      assert next(
          (
              m
              for m in models_supporting_monotone_constraints
              if m.startswith("GBM")
          ),
          None,
      ), "There should be at least one GBM model"
      for m in models_supporting_monotone_constraints:
          model = h2o.get_model(m)
          mc_value = next(
              v["actual"]
              for n, v in model.params.items()
              if n == "monotone_constraints"
          )
          if m.startswith("GBM"):
              assert isinstance(mc_value, list)
              age = next(
                  (v for v in mc_value if v["key"] == "AGE"), None
              )
              assert age is not None
              assert age["value"] == 1.0
          else:
              assert mc_value is None
  
file_path: h2o-3/h2o-py/tests/testdir_algos/automl/pyunit_automl_algo_parameters.py
imports: import sys, os
  import re
  import h2o
  import h2o.exceptions
  from h2o.automl import H2OAutoML
  from tests import pyunit_utils
  from _automl_utils import import_dataset, get_partitioned_model_names
label_desc: Use image node_id 1 for calling a global function with example usage: test_algo_parameter_can_be_applied_only_to_a_specific_algo() without return types