code: def assert_metrics_equal(
      metric, metric_name1, metric_name2, msg=None, delta=1e-5
  ):
      metric_name1 = (
          metric_name1
          if metric_name1 in metric._metric_json
          else metric_name1.upper()
      )
      metric_name2 = (
          metric_name2
          if metric_name2 in metric._metric_json
          else metric_name2.upper()
      )
      m1 = metric._metric_json[metric_name1]
      m2 = metric._metric_json[metric_name2]
      m1 = float(m1) if m1 != "NaN" else 0
      m2 = float(m2) if m2 != "NaN" else 0
      assert abs(m1 - m2) <= delta, "{}: {} != {}".format(msg, m1, m2)
  
imports: import h2o
  from .None import locate
label_desc: Use image node_id 1 for calling a global function with example usage: assert_metrics_equal(metric, metric_name1, metric_name2, msg, delta) without return types