code: def regression__plot_learning_curve_plot():
      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)
  
      gbm = H2OGradientBoostingEstimator(
          seed=1234, model_id="my_awesome_model"
      )
      gbm.train(y=y, training_frame=train)
  
      with TemporaryDirectory() as tmpdir:
          path1 = "{}/plot1.png".format(tmpdir)
          path2 = "{}/plot2.png".format(tmpdir)
          # test saving:
          test_plot_result_saving(
              gbm.pd_plot(train, col),
              path2,
              gbm.pd_plot(train, col, save_plot_path=path1),
              path1,
          )
          matplotlib.pyplot.close()
  
          # test pd_plot
          for col in cols_to_test:
              try:
                  test_plot_result_saving(
                      gbm.pd_plot(train, col),
                      path2,
                      gbm.pd_plot(train, col, save_plot_path=path1),
                      path1,
                  )
              except ValueError:
                  assert (
                      col == "name"
                  ), "'name' is a string column which is not supported."
              matplotlib.pyplot.close("all")
  
          for metric in ["auto", "deviance", "rmse"]:
              test_plot_result_saving(
                  gbm.learning_curve_plot(metric),
                  path2,
                  gbm.learning_curve_plot(
                      metric=metric.upper(), save_plot_path=path1
                  ),
                  path1,
              )
          matplotlib.pyplot.close("all")
  
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 2 for calling a global function with example usage: regression__plot_learning_curve_plot() without return types