code: def screeplot():
      kwargs = {}
      kwargs["server"] = True
      australia = h2o.upload_file(
          pyunit_utils.locate("smalldata/pca_test/AustraliaCoast.csv")
      )
      australia_pca = H2OPCA(k=4, transform="STANDARDIZE")
      australia_pca.train(x=list(range(8)), training_frame=australia)
      australia_pca.screeplot(type="barplot", **kwargs)
      screeplot_result = australia_pca.screeplot(type="lines", **kwargs)
      with TemporaryDirectory() as tmpdir:
          path = "{}/plot1.png".format(tmpdir)
          test_plot_result_saving(
              screeplot_result,
              "{}/plot2.png".format(tmpdir),
              australia_pca.screeplot(
                  type="barplot", save_plot_path=path, **kwargs
              ),
              path,
          )
  
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 8 for calling a global function with example usage: screeplot() without return types