code: def test_target_encoding_binary():
      ds = import_dataset(mode="binary")
      aml = H2OAutoML(
          project_name="automl_with_te_binary",
          max_models=5,
          preprocessing=["target_encoding"],
          seed=1,
      )
      aml.train(
          y=ds.target,
          training_frame=ds.train,
          leaderboard_frame=ds.test,
      )
      lb = aml.leaderboard
      print(lb)
      # we can't really verify from client if TE was correctly applied... so just using a poor man's check:
      mem_keys = h2o.ls().key
      # print(mem_keys)
      assert any(
          k.startswith("TargetEncoding_AutoML") for k in mem_keys
      )
      for mid in get_partitioned_model_names(lb).all:
          check_mojo_pojo_availability(mid)
  
file_path: h2o-3/h2o-py/tests/testdir_algos/automl/pyunit_automl_preprocessing.py
imports: import sys, os
  import h2o
  import h2o.exceptions
  from h2o.automl import H2OAutoML
  from tests import pyunit_utils
  from _automl_utils import get_partitioned_model_names
label_desc: Use image node_id 3 for calling a global function with example usage: test_target_encoding_binary() without return types