code: def checkpoint_new_category_in_predictor():
      sv1 = h2o.upload_file(
          pyunit_utils.locate("smalldata/iris/setosa_versicolor.csv")
      )
      sv2 = h2o.upload_file(
          pyunit_utils.locate("smalldata/iris/setosa_versicolor.csv")
      )
      vir = h2o.upload_file(
          pyunit_utils.locate("smalldata/iris/virginica.csv")
      )
      print("checkpoint_new_category_in_predictor-1")
      m1 = H2ODeepLearningEstimator(epochs=100)
      m1.train(x=[0, 1, 2, 4], y=3, training_frame=sv1)
  
      m2 = H2ODeepLearningEstimator(epochs=200, checkpoint=m1.model_id)
      m2.train(x=[0, 1, 2, 4], y=3, training_frame=sv2)
      print("checkpoint_new_category_in_predictor-2")
  
      # attempt to continue building model, but with an expanded categorical predictor domain.
      # this should fail
      try:
          m3 = H2ODeepLearningEstimator(
              epochs=200, checkpoint=m1.model_id
          )
          m3.train(x=[0, 1, 2, 4], y=3, training_frame=vir)
          assert (
              False
          ), "Expected continued model-building to fail with new categories introduced in predictor"
      except EnvironmentError:
          pass
  
      print("checkpoint_new_category_in_predictor-3")
  
      # attempt to predict on new model, but with observations that have expanded categorical predictor domain.
      predictions = m2.predict(vir)
      print("checkpoint_new_category_in_predictor-4")
  
imports: import sys, os
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.deeplearning import H2ODeepLearningEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: checkpoint_new_category_in_predictor() without return types