code: def scoring_history_plot(
      self, timestep, metric, server=False, save_plot_path=None
  ):
      plt = get_matplotlib_pyplot(server)
      if plt is None:
          return decorate_plot_result(figure=RAISE_ON_FIGURE_ACCESS)
  
      scoring_history = self.scoring_history()
  
      if self.actual_params.get("lambda_search"):
          allowed_timesteps = ["iteration", "duration"]
          allowed_metrics = [
              "deviance_train",
              "deviance_test",
              "deviance_xval",
          ]
          # When provided with multiple alpha values, scoring history contains history of all...
          scoring_history = scoring_history[
              scoring_history["alpha"]
              == self._model_json["output"]["alpha_best"]
          ]
      elif self.actual_params.get("HGLM"):
          allowed_timesteps = ["iterations", "duration"]
          allowed_metrics = ["convergence", "sumetaieta02"]
      else:
          allowed_timesteps = ["iterations", "duration"]
          allowed_metrics = ["objective", "negative_log_likelihood"]
      if metric == "AUTO":
          metric = allowed_metrics[0]
      elif metric not in allowed_metrics:
          raise H2OValueError(
              "for {}, metric must be one of: {}".format(
                  self.algo.upper(), ", ".join(allowed_metrics)
              )
          )
  
      if timestep == "AUTO":
          timestep = allowed_timesteps[0]
      elif timestep not in allowed_timesteps:
          raise H2OValueError(
              "for {}, timestep must be one of: {}".format(
                  self.algo.upper(), ", ".join(allowed_timesteps)
              )
          )
      fig = plt.figure()
      plt.xlabel(timestep)
      plt.ylabel(metric)
      plt.title("Validation Scoring History")
      style = "b-" if len(scoring_history[timestep]) > 1 else "bx"
      plt.plot(
          scoring_history[timestep], scoring_history[metric], style
      )
      if save_plot_path is not None:
          plt.savefig(fname=save_plot_path)
      if not server:
          plt.show()
      return decorate_plot_result(figure=fig)
  
file_path: h2o-3/h2o-py/h2o/model/extensions/scoring_history.py
imports: from h2o.exceptions import H2OValueError
  from h2o.plot import decorate_plot_result, get_matplotlib_pyplot, RAISE_ON_FIGURE_ACCESS
  from h2o.utils.shared_utils import can_use_pandas
  from h2o.utils.typechecks import assert_is_type
label_desc: Use image node_id 1 for calling the ScoringHistoryGLM obj's underlying member method code with example usage: obj.scoring_history_plot(timestep, metric, server, save_plot_path) and returns: decorate_plot_result, decorate_plot_result