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._get_scoring_history_to_plot()
      timestep = self._validate_timestep(timestep)
      training_metric = "training_{}".format(metric)
      validation_metric = "validation_{}".format(metric)
      if timestep == "duration":
          dur_colname = "duration_{}".format(
              scoring_history["duration"][1].split()[1]
          )
          scoring_history[dur_colname] = [
              str(x).split()[0] for x in scoring_history["duration"]
          ]
          timestep = dur_colname
  
      if can_use_pandas():
          valid = validation_metric in list(scoring_history)
          ylim = (
              (
                  scoring_history[[training_metric, validation_metric]]
                  .min()
                  .min(),
                  scoring_history[[training_metric, validation_metric]]
                  .max()
                  .max(),
              )
              if valid
              else (
                  scoring_history[training_metric].min(),
                  scoring_history[training_metric].max(),
              )
          )
      else:
          valid = validation_metric in scoring_history.col_header
          ylim = (
              (
                  min(
                      min(
                          scoring_history[
                              [training_metric, validation_metric]
                          ]
                      )
                  ),
                  max(
                      max(
                          scoring_history[
                              [training_metric, validation_metric]
                          ]
                      )
                  ),
              )
              if valid
              else (
                  min(scoring_history[training_metric]),
                  max(scoring_history[training_metric]),
              )
          )
      if ylim[0] == ylim[1]:
          ylim = (0, 1)
  
      fig = plt.figure()
      if valid:  # Training and validation scoring history
          plt.xlabel(timestep)
          plt.ylabel(metric)
          plt.title("Scoring History")
          plt.ylim(ylim)
          plt.plot(
              scoring_history[timestep],
              scoring_history[training_metric],
              label="Training",
          )
          plt.plot(
              scoring_history[timestep],
              scoring_history[validation_metric],
              color="orange",
              label="Validation",
          )
          plt.legend()
      else:  # Training scoring history only
          plt.xlabel(timestep)
          plt.ylabel(training_metric)
          plt.title("Training Scoring History")
          plt.ylim(ylim)
          plt.plot(
              scoring_history[timestep],
              scoring_history[training_metric],
          )
      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 5 for calling the ScoringHistory 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