code: def test_symbolic_transformer():
      """Check that SymbolicTransformer example works"""
  
      rng = check_random_state(0)
      diabetes = load_diabetes()
      perm = rng.permutation(diabetes.target.size)
      diabetes.data = diabetes.data[perm]
      diabetes.target = diabetes.target[perm]
  
      est = Ridge()
      est.fit(diabetes.data[:300, :], diabetes.target[:300])
      assert_almost_equal(
          est.score(diabetes.data[300:, :], diabetes.target[300:]),
          desired=0.43406,
          decimal=5,
      )
  
      function_set = [
          "add",
          "sub",
          "mul",
          "div",
          "sqrt",
          "log",
          "abs",
          "neg",
          "inv",
          "max",
          "min",
      ]
      gp = SymbolicTransformer(
          generations=20,
          population_size=2000,
          hall_of_fame=100,
          n_components=10,
          function_set=function_set,
          parsimony_coefficient=0.0005,
          max_samples=0.9,
          random_state=0,
      )
      gp.fit(diabetes.data[:300, :], diabetes.target[:300])
  
      gp_features = gp.transform(diabetes.data)
      new_diabetes = np.hstack((diabetes.data, gp_features))
  
      est = Ridge()
      est.fit(new_diabetes[:300, :], diabetes.target[:300])
      assert_almost_equal(
          est.score(new_diabetes[300:, :], diabetes.target[300:]),
          desired=0.53368,
          decimal=5,
      )
  
file_path: gplearn/gplearn/tests/test_examples.py
imports: import numpy
  from sklearn.datasets import load_diabetes, load_breast_cancer
  from sklearn.datasets import make_moons, make_circles, make_classification
  from sklearn.linear_model import Ridge
  from sklearn.metrics import roc_auc_score
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils._testing import assert_almost_equal
  from sklearn.utils.validation import check_random_state
  from gplearn.genetic import SymbolicClassifier, SymbolicRegressor
  from gplearn.genetic import SymbolicTransformer
  from gplearn.functions import make_function
label_desc: Use image node_id 2 for calling a global function with example usage: test_symbolic_transformer() without return types