code: def check_model_property(
      model,
      prop_name,
      actual_value=None,
      default_value=None,
      present=True,
  ):
      if present:
          assert (
              prop_name in model.params.keys()
          ), "missing {prop} in model {model}".format(
              prop=prop_name, model=model
          )
          assert (
              actual_value is None
              or model.params[prop_name]["actual"] == actual_value
          ), "actual value for {prop} in model {model} is {val}, expected {exp}".format(
              prop=prop_name,
              model=model,
              val=model.params[prop_name]["actual"],
              exp=actual_value,
          )
          assert (
              default_value is None
              or model.params[prop_name]["default"] == default_value
          ), "default value for {prop} in model {model} is {val}, expected {exp}".format(
              prop=prop_name,
              model=model,
              val=model.params[prop_name]["default"],
              exp=default_value,
          )
      else:
          assert (
              prop_name not in model.params.keys()
          ), "unexpected {prop} in model {model}".format(
              prop=prop_name, model=model
          )
  
imports: import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.gbm import H2OGradientBoostingEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: check_model_property(model, prop_name, actual_value, default_value, present) without return types