code: def test_cegb_scaling_equalities(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)
      # Compare pairs of penalties, to ensure scaling works as intended
      pairs = [
          (
              {"cegb_penalty_feature_coupled": [1, 2, 1, 2, 1]},
              {
                  "cegb_penalty_feature_coupled": [0.5, 1, 0.5, 1, 0.5],
                  "cegb_tradeoff": 2,
              },
          ),
          (
              {
                  "cegb_penalty_feature_lazy": [
                      0.01,
                      0.02,
                      0.03,
                      0.04,
                      0.05,
                  ]
              },
              {
                  "cegb_penalty_feature_lazy": [
                      0.005,
                      0.01,
                      0.015,
                      0.02,
                      0.025,
                  ],
                  "cegb_tradeoff": 2,
              },
          ),
          (
              {"cegb_penalty_split": 1},
              {"cegb_penalty_split": 2, "cegb_tradeoff": 0.5},
          ),
      ]
      for p1, p2 in pairs:
          booster1 = lgb.Booster(train_set=ds, params=p1)
          booster2 = lgb.Booster(train_set=ds, params=p2)
          for _ in range(10):
              booster1.update()
              booster2.update()
          p1name = tmp_path / "p1.txt"
          # Reset booster1's parameters to p2, so the parameter section of the file matches.
          booster1.reset_parameter(p2)
          booster1.save_model(p1name)
          with open(p1name, "rt") as f:
              p1txt = f.read()
          p2name = tmp_path / "p2.txt"
          booster2.save_model(p2name)
          with open(p2name, "rt") as f:
              p2txt = f.read()
          assert p1txt == p2txt
  
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 16 for calling a global function with example usage: test_cegb_scaling_equalities(tmp_path) without return types