code: def train_models(self):
      try:
          self.h2o_model = H2OGridSearch(
              H2OGeneralizedAdditiveEstimator(
                  family="gaussian", keep_gam_cols=True
              ),
              self.hyper_parameters,
              search_criteria=self.search_criteria,
          )
          self.h2o_model.train(
              x=self.myX, y=self.myY, training_frame=self.h2o_data
          )
      except:
          print(
              "Error was raised because gam_columns was specified in hyper parameters and constrained hyper parameters"
          )
      else:
          raise Exception(
              "No errors raised despite gam_columns being in hyper parameters and constrained hyper parameters"
          )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/gam/pyunit_PUBDEV_7367_gridsearch_subspaces_invalid.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 3 for calling the test_gam_gridsearch_specific obj's underlying member method code with example usage: obj.train_models() without return types