code: def buildModelCheckpointing(
      training_frame, x_indices, y_index, family, solver
  ):
      split_frames = training_frame.split_frame(
          ratios=[0.9], seed=12345
      )
      modelLong = H2OGeneralizedLinearEstimator(
          family=family, solver=solver, Lambda=0.5, alpha=0.5
      )  # allow to run to completion
      modelLong.train(
          training_frame=split_frames[0],
          x=x_indices,
          y=y_index,
          validation_frame=split_frames[1],
      )
      model = H2OGeneralizedLinearEstimator(
          family=family,
          max_iterations=3,
          Lambda=0,
          alpha=0,
          solver=solver,
      )
      model.train(
          training_frame=split_frames[0],
          x=x_indices,
          y=y_index,
          validation_frame=split_frames[1],
      )
      modelCheckpoint = H2OGeneralizedLinearEstimator(
          family=family,
          checkpoint=model.model_id,
          solver=solver,
          Lambda=0,
          alpha=0,
      )
      modelCheckpoint.train(
          training_frame=split_frames[0],
          x=x_indices,
          y=y_index,
          validation_frame=split_frames[1],
      )
      assert modelCheckpoint.mse() <= modelLong.mse(), (
          "Checkpoint MSE {0} should be lower than normal model MSE {1} but "
          "is not!".format(modelCheckpoint.mse(), modelLong.mse())
      )
  
imports: from builtins import range
  import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.glm import H2OGeneralizedLinearEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: buildModelCheckpointing(training_frame, x_indices, y_index, family, solver) without return types