code: def verifyCorrectAddedRemovedPreds(model, mode):
      resultFrame = model.result()
      best_predictors = model.get_best_model_predictors()
      removed_predictors = model.get_predictors_removed_per_step()
  
      # assert result frame and model summary results are the same
      compareFrameNTuple(resultFrame[3], best_predictors)
      compareFrameNTuple(resultFrame[4], removed_predictors)
      if not (mode == "backward"):
          added_predictors = model.get_predictors_added_per_step()
          compareFrameNTuple(resultFrame[5], added_predictors)
      else:
          added_predictors = None
  
      # verify added and removed predictors are correctly derived
      assertCorrectAddedDeletedPreds(
          best_predictors, added_predictors, removed_predictors, mode
      )
  
imports: import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.model_selection import H2OModelSelectionEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: verifyCorrectAddedRemovedPreds(model, mode) without return types