code: def check_model_metrics(default_model, custom_model, model_type):
      shd = default_model.scoring_history()
      shc = custom_model.scoring_history()
      for metric in shd:
          if metric in [
              "timestamp",
              "duration",
              "training_deviance",
              "validation_deviance",
          ]:
              continue
          assert (shd[metric].isnull() == shc[metric].isnull()).all(), (
              "Scoring history is not the same for default and custom %s distribution and %s metric"
              % (model_type, metric)
          )
          assert (shd[metric].dropna() == shc[metric].dropna()).all(), (
              "Scoring history is not the same for default and custom %s distribution and %s metric."
              % (model_type, metric)
          )
  
file_path: h2o-3/h2o-py/tests/pyunit_utils/utils_model_custom_distribution.py
imports: import h2o
  from .None import locate
label_desc: Use image node_id 1 for calling a global function with example usage: check_model_metrics(default_model, custom_model, model_type) without return types