code: def match_models(self):
      for model in self.manual_gam_models:
          scale = model.actual_params["scale"]
          gam_columns = model.actual_params["gam_columns"]
          num_knots = model.actual_params["num_knots"]
          lambda_ = model.actual_params["lambda"]
          bs = model.actual_params["bs"]
          for grid_search_model in self.h2o_model.models:
              if (
                  grid_search_model.actual_params["gam_columns"]
                  == gam_columns
                  and grid_search_model.actual_params["scale"] == scale
                  and grid_search_model.actual_params["bs"] == bs
                  and grid_search_model.actual_params["num_knots"]
                  == num_knots
                  and grid_search_model.actual_params["lambda"]
                  == lambda_
              ):
                  assert (
                      grid_search_model.coef() == model.coef()
                  ), "coefficients should be equal"
                  break
  
      assert len(self.h2o_model.models) == self.expected_grid_models, (
          "Expected model number: {0}, actual model number: "
          "{1}".format(
              self.expected_grid_models, len(self.h2o_model.models)
          )
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/gam/pyunit_PUBDEV_8398_random_gridsearch_subspaces.py
imports: import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
  from h2o.grid.grid_search import H2OGridSearch
label_desc: Use image node_id 4 for calling the test_random_gam_gridsearch_specific obj's underlying member method code with example usage: obj.match_models() without return types