code: def test_explanation_list_of_models_regression():
      train = h2o.upload_file(
          pyunit_utils.locate("smalldata/titanic/titanic_expanded.csv")
      )
      y = "fare"
  
      # get at most one column from each type
      cols_to_test = []
      for col, typ in train.types.items():
          for ctt in cols_to_test:
              if typ == train.types[ctt] or col == y:
                  break
          else:
              cols_to_test.append(col)
  
      aml = H2OAutoML(seed=1234, max_models=5)
      aml.train(y=y, training_frame=train)
  
      models = [
          h2o.get_model(m[0])
          for m in aml.leaderboard["model_id"].as_data_frame(
              use_pandas=False, header=False
          )
      ]
  
      # Test named models as well
      gbm = H2OGradientBoostingEstimator(model_id="my_awesome_model")
      gbm.train(y=y, training_frame=train)
      models += [gbm]
  
      # test variable importance heatmap plot
      assert isinstance(
          h2o.varimp_heatmap(models).figure(), matplotlib.pyplot.Figure
      )
      matplotlib.pyplot.close()
  
      # test model correlation heatmap plot
      assert isinstance(
          h2o.model_correlation_heatmap(models, train).figure(),
          matplotlib.pyplot.Figure,
      )
      matplotlib.pyplot.close()
  
      # test partial dependences
      for col in cols_to_test:
          try:
              assert isinstance(
                  h2o.pd_multi_plot(models, train, col).figure(),
                  matplotlib.pyplot.Figure,
              )
          except ValueError:
              assert (
                  col == "name"
              ), "'name' is a string column which is not supported."
      matplotlib.pyplot.close("all")
  
      # test learning curve
      for model in models:
          assert isinstance(
              model.learning_curve_plot().figure(),
              matplotlib.pyplot.Figure,
          )
      matplotlib.pyplot.close("all")
  
      # test explain
      assert isinstance(
          h2o.explain(models, train, render=False), H2OExplanation
      )
  
      # test explain row
      assert isinstance(
          h2o.explain_row(models, train, 1, render=False),
          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 5 for calling a global function with example usage: test_explanation_list_of_models_regression() without return types