code: def compare_frames(f1, f2):
      """
      compare two frames with same column names but the order of the columns may have been switched.
      """
      names = f1.names
      assert f1.nrow == f2.nrow and f2.ncol == f2.ncol, (
          "Expected frame size: {0} rows by {1} cols.  Actual: {2} rows "
          "by {3} cols".format(f1.nrow, f1.ncol, f2.nrow, f2.ncol)
      )
      for colName in names:
          pyunit_utils.compare_frames_local(
              f1[colName], f2[colName], prob=1, tol=1e-6
          )
  
imports: import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.model_selection import H2OModelSelectionEstimator
  from h2o.estimators.glm import H2OGeneralizedLinearEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: compare_frames(f1, f2) without return types