code: def test_results_are_equivalent(estimator_cls):
      comparisons = [
          ("with_h2o_frames", "with_numpy_arrays_in"),
          ("with_numpy_arrays_in", "with_numpy_arrays_inout"),
      ]
      est_results = results[estimator_cls]
      for lk, rk in comparisons:
          if lk in est_results and rk in est_results:
              try:
                  assert np.allclose(
                      est_results[lk], est_results[rk]
                  ), "expected equivalent results but got {lk}={lresult} and {rk}={rresult}".format(
                      lk=lk,
                      rk=rk,
                      lresult=est_results[lk],
                      rresult=est_results[rk],
                  )
              except AssertionError as e:
                  if _get_custom_behaviour(estimator_cls).get(
                      "results_may_differ", False
                  ):
                      print("ERROR !!! " + str(e))
                  else:
                      raise e
          elif lk not in est_results:
              print(
                  "no results for {}".format(
                      estimator_cls.__name__ + " " + lk
                  )
              )
          else:
              print(
                  "no results for {}".format(
                      estimator_cls.__name__ + " " + rk
                  )
              )
  
file_path: h2o-3/h2o-py/tests/testdir_sklearn/pyunit_sklearn_estimators_as_transformers.py
imports: from collections import defaultdict
  from functools import partial
  import gc, inspect, os, sys
  import numpy
  from sklearn.datasets import make_classification, make_regression
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import train_test_split
  import h2o
  from h2o.sklearn.wrapper import H2OConnectionMonitorMixin
  from tests import pyunit_utils, Namespace
label_desc: Use image node_id 7 for calling a global function with example usage: test_results_are_equivalent(estimator_cls) without return types