code: def test_transformer_iterable():
      """Check that the transformer is iterable"""
  
      random_state = check_random_state(415)
      X = np.reshape(random_state.uniform(size=50), (5, 10))
      y = random_state.uniform(size=5)
      function_set = [
          "add",
          "sub",
          "mul",
          "div",
          "sqrt",
          "log",
          "abs",
          "neg",
          "inv",
          "max",
          "min",
      ]
      est = SymbolicTransformer(
          population_size=500,
          generations=2,
          function_set=function_set,
          random_state=0,
      )
  
      # Check unfitted
      unfitted_len = len(est)
      unfitted_iter = [gp.length_ for gp in est]
      expected_iter = []
  
      assert unfitted_len == 0
      assert unfitted_iter == expected_iter
  
      # Check fitted
      est.fit(X, y)
      fitted_len = len(est)
      fitted_iter = [gp.length_ for gp in est]
      expected_iter = [8, 12, 2, 29, 9, 33, 9, 8, 4, 22]
  
      assert fitted_len == 10
      assert fitted_iter == expected_iter
  
      # Check IndexError
      assert_raises(IndexError, est.__getitem__, 10)
  
imports: import pickle
  import pytest
  import sys
  from io import StringIO
  import numpy
  from scipy.stats import pearsonr, spearmanr
  from sklearn.datasets import load_diabetes, load_breast_cancer
  from sklearn.metrics import mean_absolute_error
  from sklearn.model_selection import GridSearchCV
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.tree import DecisionTreeRegressor
  from sklearn.utils._testing import assert_almost_equal
  from sklearn.utils._testing import assert_array_equal
  from sklearn.utils._testing import assert_array_almost_equal
  from sklearn.utils._testing import assert_raises
  from sklearn.utils.validation import check_random_state
  from gplearn.genetic import SymbolicClassifier, SymbolicRegressor
  from gplearn.genetic import SymbolicTransformer
  from gplearn.fitness import weighted_pearson, weighted_spearman
  from gplearn._program import _Program
  from gplearn.fitness import _fitness_map
  from gplearn.functions import add2, sub2, mul2, div2, sqrt1, log1, abs1, max2, min2
  from gplearn.functions import _Function
label_desc: Use image node_id 28 for calling a global function with example usage: test_transformer_iterable() without return types