code: def test_cegb_affects_behavior(tmp_path):
      X = np.random.random((100, 5))
      X[:, [1, 3]] = 0
      y = np.random.random(100)
      names = [f"col_{i}" for i in range(5)]
      ds = lgb.Dataset(X, feature_name=names).construct()
      ds.set_label(y)
      base = lgb.Booster(train_set=ds)
      for _ in range(10):
          base.update()
      basename = tmp_path / "basename.txt"
      base.save_model(basename)
      with open(basename, "rt") as f:
          basetxt = f.read()
      # Set extremely harsh penalties, so CEGB will block most splits.
      cases = [
          {"cegb_penalty_feature_coupled": [50, 100, 10, 25, 30]},
          {"cegb_penalty_feature_lazy": [1, 2, 3, 4, 5]},
          {"cegb_penalty_split": 1},
      ]
      for case in cases:
          booster = lgb.Booster(train_set=ds, params=case)
          for _ in range(10):
              booster.update()
          casename = tmp_path / "casename.txt"
          booster.save_model(casename)
          with open(casename, "rt") as f:
              casetxt = f.read()
          assert basetxt != casetxt
  
imports: import filecmp
  import numbers
  import re
  from copy import deepcopy
  from os import getenv
  from pathlib import Path
  import numpy
  import pytest
  from scipy import sparse
  from sklearn.datasets import dump_svmlight_file, load_svmlight_file
  from sklearn.model_selection import train_test_split
  import lightgbm
  from lightgbm.compat import PANDAS_INSTALLED, pd_DataFrame, pd_Series
  from .utils import dummy_obj, load_breast_cancer, mse_obj, np_assert_array_equal
label_desc: Use image node_id 15 for calling a global function with example usage: test_cegb_affects_behavior(tmp_path) without return types