code: def test_varimp_heatmap_model_correlation_heatmap():
      train = h2o.upload_file(
          pyunit_utils.locate("smalldata/logreg/prostate.csv")
      )
      y = "CAPSULE"
      train[y] = train[y].asfactor()
      # 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]
  
      with TemporaryDirectory() as tmpdir:
          path1 = "{}/plot1.png".format(tmpdir)
          path2 = "{}/plot2.png".format(tmpdir)
          test_plot_result_saving(
              h2o.varimp_heatmap(models),
              path2,
              h2o.varimp_heatmap(models, save_plot_path=path1),
              path1,
          )
          test_plot_result_saving(
              h2o.model_correlation_heatmap(models, train),
              path2,
              h2o.model_correlation_heatmap(
                  models, train, save_plot_path=path1
              ),
              path1,
          )
      h2o.varimp_heatmap(models)
  
imports: import sys
  import matplotlib
  from h2o.automl import H2OAutoML
  from h2o.estimators import H2OGradientBoostingEstimator
  from h2o.exceptions import H2OError
  from h2o.transforms import H2OPCA
  import h2o
  from tests import pyunit_utils, test_plot_result_saving, TemporaryDirectory
  from h2o.estimators.glm import H2OGeneralizedLinearEstimator, H2OGeneralizedLinearEstimator
  from h2o.plot import decorate_plot_result, RAISE_ON_FIGURE_ACCESS
label_desc: Use image node_id 11 for calling a global function with example usage: test_varimp_heatmap_model_correlation_heatmap() without return types