code: def pipeline_code_wrapper(pipeline_code, random_state=None):
      """Generate code specific to the execution of the sklearn pipeline.
  
      Parameters
      ----------
      pipeline_code: str
          Code that defines the final sklearn pipeline
      random_state: integer or None
          Random seed in train_test_split function and exported pipeline.
  
      Returns
      -------
      exported_code: str
          Source code for the sklearn pipeline and calls to fit and predict
  
      """
      if random_state is None:
          exported_code = """exported_pipeline = {}
  
  exported_pipeline.fit(training_features, training_target)
  results = exported_pipeline.predict(testing_features)
  """.format(
              pipeline_code
          )
      else:
          if pipeline_code.startswith("make_pipeline"):
              exported_code = """exported_pipeline = {}
  # Fix random state for all the steps in exported pipeline
  set_param_recursive(exported_pipeline.steps, 'random_state', {})
  
  exported_pipeline.fit(training_features, training_target)
  results = exported_pipeline.predict(testing_features)
  """.format(
                  pipeline_code, random_state
              )
          else:
              exported_code = """exported_pipeline = {}
  # Fix random state in exported estimator
  if hasattr(exported_pipeline, 'random_state'):
      setattr(exported_pipeline, 'random_state', {})
  
  exported_pipeline.fit(training_features, training_target)
  results = exported_pipeline.predict(testing_features)
  """.format(
                  pipeline_code, random_state
              )
  
      return exported_code
  
file_path: tpot/tpot/export_utils.py
imports: import deap
label_desc: Use image node_id 6 for calling a global function with example usage: pipeline_code_wrapper(pipeline_code, random_state) and returns: exported_code