code: def test_columns_groups_are_encoded_as_a_single_interaction():
      ds = load_dataset(incl_test=True)
      categoricals = list(
          {n for n, t in ds.train.types.items() if t == "enum"}
          - {ds.target}
      )
      assert len(categoricals) > 3
      no_inter = categoricals[0]
      two_inter = [categoricals[0], categoricals[1]]
      three_inter = [categoricals[0], categoricals[1], categoricals[2]]
      te = H2OTargetEncoderEstimator(
          columns_to_encode=[no_inter, two_inter, three_inter]
      )
      te.train(y=ds.target, training_frame=ds.train)
      encoded = te.predict(ds.test)
      te_cols = [c for c in encoded.names if c.endswith("_te")]
      assert len(te_cols) == 3
      assert "{}_te".format(no_inter) in te_cols
      assert "{}:{}_te".format(*two_inter) in te_cols
      assert "{}:{}:{}_te".format(*three_inter) in te_cols
  
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 8 for calling a global function with example usage: test_columns_groups_are_encoded_as_a_single_interaction() without return types