code: def test_set_param_recursive_2():
      """Assert that set_param_recursive sets \"random_state\" to 42 in nested estimator in SelectFromModel."""
      pipeline_string = (
          "DecisionTreeRegressor(SelectFromModel(input_matrix, "
          "SelectFromModel__ExtraTreesRegressor__max_features=0.05, SelectFromModel__ExtraTreesRegressor__n_estimators=100, "
          "SelectFromModel__threshold=0.05), DecisionTreeRegressor__max_depth=8,"
          "DecisionTreeRegressor__min_samples_leaf=5, DecisionTreeRegressor__min_samples_split=5)"
      )
      tpot_obj = TPOTRegressor()
      tpot_obj._fit_init()
      deap_pipeline = creator.Individual.from_string(
          pipeline_string, tpot_obj._pset
      )
      sklearn_pipeline = tpot_obj._toolbox.compile(expr=deap_pipeline)
      set_param_recursive(sklearn_pipeline.steps, "random_state", 42)
  
      assert (
          getattr(
              getattr(sklearn_pipeline.steps[0][1], "estimator"),
              "random_state",
          )
          == 42
      )
      assert getattr(sklearn_pipeline.steps[1][1], "random_state") == 42
  
imports: from tqdm import tqdm
  import numpy
  from os import remove, path
  from tpot import TPOTClassifier, TPOTRegressor
  from tpot.export_utils import export_pipeline, generate_import_code, _indent, generate_pipeline_code, get_by_name, set_param_recursive
  from tpot.operator_utils import TPOTOperatorClassFactory
  from tpot.config.classifier import classifier_config_dict
  from sklearn.datasets import load_digits
  from sklearn.model_selection import train_test_split
  from deap import creator
  from nose.tools import assert_raises, assert_equal, nottest
label_desc: Use image node_id 25 for calling a global function with example usage: test_set_param_recursive_2() without return types