code: def _check_grid_loaded_properly(loaded, train, old_grid_model_count):
      assert loaded is not None
      assert len(loaded.model_ids) == old_grid_model_count
      loaded_train = h2o.H2OFrame.get_frame(train.frame_id)
      assert loaded_train is not None, "Train frame was not loaded"
  
file_path: h2o-3/h2o-py/tests/testdir_algos/grid/pyunit_grid_resume_with_recovery.py
imports: import sys
  import os
  import tempfile
  import time
  import numpy
  import h2o
  from tests import pyunit_utils
  from h2o.grid.grid_search import H2OGridSearch
  from h2o.estimators.gbm import H2OGradientBoostingEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: _check_grid_loaded_properly(loaded, train, old_grid_model_count) without return types