code: def test_parallel_train():
      """Check predictions are the same for different n_jobs"""
  
      # Check the regressor
      ests = [
          SymbolicRegressor(
              population_size=100,
              generations=4,
              n_jobs=n_jobs,
              random_state=0,
          ).fit(diabetes.data[:100, :], diabetes.target[:100])
          for n_jobs in [1, 2, 3, 8, 16]
      ]
  
      preds = [e.predict(diabetes.data[400:, :]) for e in ests]
      for pred1, pred2 in zip(preds, preds[1:]):
          assert_array_almost_equal(pred1, pred2)
      lengths = np.array(
          [[gp.length_ for gp in e._programs[-1]] for e in ests]
      )
      for len1, len2 in zip(lengths, lengths[1:]):
          assert_array_almost_equal(len1, len2)
  
      # Check the transformer
      ests = [
          SymbolicTransformer(
              population_size=100,
              hall_of_fame=50,
              generations=4,
              n_jobs=n_jobs,
              random_state=0,
          ).fit(diabetes.data[:100, :], diabetes.target[:100])
          for n_jobs in [1, 2, 3, 8, 16]
      ]
  
      preds = [e.transform(diabetes.data[400:, :]) for e in ests]
      for pred1, pred2 in zip(preds, preds[1:]):
          assert_array_almost_equal(pred1, pred2)
      lengths = np.array(
          [[gp.length_ for gp in e._programs[-1]] for e in ests]
      )
      for len1, len2 in zip(lengths, lengths[1:]):
          assert_array_almost_equal(len1, len2)
  
      # Check the classifier
      ests = [
          SymbolicClassifier(
              population_size=100,
              generations=4,
              n_jobs=n_jobs,
              random_state=0,
          ).fit(cancer.data[:100, :], cancer.target[:100])
          for n_jobs in [1, 2, 3, 8, 16]
      ]
  
      preds = [e.predict(cancer.data[400:, :]) for e in ests]
      for pred1, pred2 in zip(preds, preds[1:]):
          assert_array_almost_equal(pred1, pred2)
      lengths = np.array(
          [[gp.length_ for gp in e._programs[-1]] for e in ests]
      )
      for len1, len2 in zip(lengths, lengths[1:]):
          assert_array_almost_equal(len1, len2)
  
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 23 for calling a global function with example usage: test_parallel_train() without return types