code: def test_keep_cross_validation_fold_assignment_enabled_with_nfolds_eq_0():
      print(
          "Check that fold assignments were skipped when `keep_cross_validation_fold_assignment` = True and nfolds = 0"
      )
      ds = import_dataset()
      aml = H2OAutoML(
          project_name="py_aml_keep_cross_validation_fold_assignment_2",
          nfolds=0,
          max_models=3,
          seed=1,
          keep_cross_validation_fold_assignment=True,
      )
      aml.train(y=ds.target, training_frame=ds.train)
      base_models = get_partitioned_model_names(aml.leaderboard).base
      amodel = h2o.get_model(base_models[0])
      assert (
          amodel.params["keep_cross_validation_fold_assignment"][
              "actual"
          ]
          == False
      )
      assert (
          amodel._model_json["output"][
              "cross_validation_fold_assignment_frame_id"
          ]
          == None
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/automl/pyunit_automl_cross_validation.py
imports: import sys, os
  from itertools import cycle, islice
  from random import uniform
  import h2o
  from h2o.automl import H2OAutoML
  from tests import pyunit_utils
  from _automl_utils import import_dataset, get_partitioned_model_names
label_desc: Use image node_id 8 for calling a global function with example usage: test_keep_cross_validation_fold_assignment_enabled_with_nfolds_eq_0() without return types