code: def assert_all_metrics_equal(model, f_test, metric_name, value):
      mm_train = model.model_performance(train=True)
      assert (
          mm_train._metric_json["custom_metric_value"] == value
      ), "{} metric on training data should be {}".format(
          metric_name, value
      )
  
      mm_valid = model.model_performance(valid=True)
      assert (
          mm_valid._metric_json["custom_metric_value"] == value
      ), "{} metric on validation data should be {}".format(
          metric_name, value
      )
  
      # Make a new model metric
      mm_test = model.model_performance(test_data=f_test)
      assert (
          mm_test._metric_json["custom_metric_value"] == value
      ), "{} metric on validation data should be {}".format(
          metric_name, value
      )
  
imports: import h2o
  from .None import locate
label_desc: Use image node_id 2 for calling a global function with example usage: assert_all_metrics_equal(model, f_test, metric_name, value) without return types