code: def test_strategies_produce_different_results_for_training():
      ds = load_dataset(incl_foldc=True)
      te_none = H2OTargetEncoderEstimator(noise=0)
      te_none.train(y=ds.target, training_frame=ds.train)
      encoded_none = te_none.transform(ds.train, as_training=True)
      te_loo = H2OTargetEncoderEstimator(
          data_leakage_handling="leave_one_out", noise=0
      )
      te_loo.train(y=ds.target, training_frame=ds.train)
      encoded_loo = te_loo.transform(ds.train, as_training=True)
      te_kfold = H2OTargetEncoderEstimator(
          data_leakage_handling="kfold", noise=0
      )
      te_kfold.train(
          y=ds.target, training_frame=ds.train, fold_column="foldc"
      )
      encoded_kfold = te_kfold.transform(ds.train, as_training=True)
  
      for l, r in itertools.combinations(
          [encoded_none, encoded_loo, encoded_kfold], 2
      ):
          try:
              assert pu.compare_frames(l, r, 0, tol_numeric=1e-2)
              assert False, "should have raised"
          except AssertionError as ae:
              assert "should have raised" not in str(ae)
  
file_path: h2o-3/h2o-py/tests/testdir_algos/targetencoder/pyunit_targetencoder_data_leakage.py
imports: import itertools
  import os
  import sys
  import h2o
  from h2o.estimators import H2OTargetEncoderEstimator, H2OGradientBoostingEstimator
  from h2o.exceptions import H2OTypeError
  from tests import pyunit_utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_strategies_produce_different_results_for_training() without return types