code: def test_fold_column_is_not_encoded():
      ds = load_dataset(incl_foldc=True)
      te = H2OTargetEncoderEstimator(data_leakage_handling="none")
      te.train(
          y=ds.target, training_frame=ds.train, fold_column="foldc"
      )
      encoded = te.predict(ds.train)
      assert "foldc" in encoded.names
      assert "foldc_te" not in encoded.names
  
      te = H2OTargetEncoderEstimator(data_leakage_handling="kfold")
      te.train(
          y=ds.target, training_frame=ds.train, fold_column="foldc"
      )
      encoded = te.predict(ds.train)
      assert "foldc" in encoded.names
      assert "foldc_te" not in encoded.names
  
      te = H2OTargetEncoderEstimator(
          data_leakage_handling="leave_one_out"
      )
      te.train(
          y=ds.target, training_frame=ds.train, fold_column="foldc"
      )
      encoded = te.predict(ds.train)
      assert "foldc" in encoded.names
      assert "foldc_te" not in encoded.names
  
file_path: h2o-3/h2o-py/tests/testdir_algos/targetencoder/pyunit_targetencoder_training.py
imports: import os
  import sys
  import h2o
  from h2o.estimators import H2OTargetEncoderEstimator
  from h2o.exceptions import H2OResponseError
  from tests import pyunit_utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_fold_column_is_not_encoded() without return types