code: def match_models(self):
      for model in self.manual_gam_models:
          scale = model.actual_params["scale"]
          gam_columns = model.actual_params["gam_columns"]
          lambda_ = model.actual_params["lambda"]
          bsVal = 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"] == bsVal
                  and grid_search_model.actual_params["lambda"]
                  == lambda_
              ):
                  self.num_grid_models += 1
                  print(
                      "grid model number " + str(self.num_grid_models)
                  )
                  print("gridSearch model coefficients")
                  print(grid_search_model.coef())
                  print("manual model coefficients")
                  print(model.coef())
                  pyunit_utils.assertEqualCoeffDicts(
                      grid_search_model.coef(), model.coef(), tol=1e-6
                  )
                  break
  
      assert (
          self.num_grid_models == self.num_expected_models
      ), "Grid search model parameters incorrect or incorrect number of models generated"
  
file_path: h2o-3/h2o-py/tests/testdir_algos/gam/pyunit_PUBDEV_7860_PUBDEV_7367_random_gridsearch_subspaces_thin_plate_gaussian.py
imports: from past.utils import old_div
  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