code: def test_automl_creates_interpretable_SE_iff_monotonic_models_exist():
      ds = import_dataset()
      aml_mono = H2OAutoML(
          project_name="test_automl_creates_interpretable_se",
          max_models=5,
          include_algos=["GBM", "XGBoost", "DRF", "StackedEnsemble"],
          monotone_constraints=dict(
              AGE=1, DPROS=1, DCAPS=1, PSA=1, VOL=1, GLEASON=1
          ),
          seed=1234,
      )
      aml_mono.train(y=ds.target, training_frame=ds.train)
  
      assert (
          aml_mono.leaderboard.as_data_frame()["model_id"]
          .apply(lambda model_name: "Monotonic" in model_name)
          .any()
      )
  
      # If we don't have monotonic constraints we shouldn't have monotonically constrained SE
      aml = H2OAutoML(
          project_name="test_automl_doesnt_create_interpretable_se",
          max_models=2,
          include_algos=["GBM", "XGBoost", "StackedEnsemble"],
          seed=1234,
      )
      aml.train(y=ds.target, training_frame=ds.train)
  
      assert not (
          aml.leaderboard.as_data_frame()["model_id"]
          .apply(lambda model_name: "Monotonic" in model_name)
          .any()
      )
  
imports: import sys, os
  import h2o
  from h2o.automl import H2OAutoML
  from tests import pyunit_utils
  from _automl_utils import import_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: test_automl_creates_interpretable_SE_iff_monotonic_models_exist() without return types