code: def test_pav(y, X, w):
      X = X.reshape(-1)
      # run Isotonic Regression to extract thresholds
      iso_reg = IsotonicRegression().fit(X, y, w)
      thresholds_scikit = H2OFrame(
          np.column_stack(get_thresholds(iso_reg))
      )
      print(thresholds_scikit.as_data_frame())
  
      # now invoke H2O PAVA
      thresholds_h2o = pav(y, X, w)
      print(thresholds_h2o.as_data_frame())
  
      assert_frame_equal(
          thresholds_scikit.as_data_frame(),
          thresholds_h2o.as_data_frame(),
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/isotonic/pyunit_pava.py
imports: import sys
  from tests import pyunit_utils
  import numpy
  from pandas.testing import assert_frame_equal
  from sklearn.datasets import make_regression
  from sklearn.isotonic import IsotonicRegression
  from h2o import H2OFrame
  from h2o.expr import ExprNode
label_desc: Use image node_id 2 for calling a global function with example usage: test_pav(y, X, w) without return types