code: def test_include_exclude_validation():
      from h2o.exceptions import H2OValueError
  
      train = h2o.upload_file(
          pyunit_utils.locate("smalldata/titanic/titanic_expanded.csv")
      )
      train["name"] = train["name"].asfactor()
      y = "fare"
  
      gbm = H2OGradientBoostingEstimator(
          seed=1234, model_id="my_awesome_model", ntrees=3
      )
      gbm.train(y=y, training_frame=train)
  
      try:
          gbm.explain(train, include_explanations=["lorem"])
          assert (
              False
          ), "Should fail as 'lorem' is not a valid explanation"
      except H2OValueError:
          pass
  
      try:
          gbm.explain(train, exclude_explanations=["lorem"])
          assert (
              False
          ), "Should fail as 'lorem' is not a valid explanation"
      except H2OValueError:
          pass
  
      assert isinstance(
          gbm.explain(train, include_explanations=["varimp"]),
          H2OExplanation,
      )
  
      assert isinstance(
          gbm.explain(
              train,
              exclude_explanations=[
                  "pdp",
                  "shap_summary",
                  "ice",
                  "residual_analysis",
              ],
          ),
          H2OExplanation,
      )
  
imports: import os
  import sys
  import pandas
  from h2o.grid import H2OGridSearch
  import matplotlib
  import h2o
  import pandas
  import matplotlib.pyplot
  from tests import pyunit_utils, test_plot_result_saving
  from h2o.automl import H2OAutoML
  from h2o.estimators import *
  from h2o.explanation._explain import H2OExplanation
label_desc: Use image node_id 21 for calling a global function with example usage: test_include_exclude_validation() without return types