code: def test_genetic_operations():
      """Check all genetic operations are stable and don't change programs"""
  
      params = {
          "function_set": [add2, sub2, mul2, div2],
          "arities": {2: [add2, sub2, mul2, div2]},
          "init_depth": (2, 6),
          "init_method": "half and half",
          "n_features": 10,
          "const_range": (-1.0, 1.0),
          "metric": "mean absolute error",
          "p_point_replace": 0.05,
          "parsimony_coefficient": 0.1,
      }
      random_state = check_random_state(415)
  
      # Test for a small program
      test_gp = [mul2, div2, 8, 1, sub2, 9, 0.5]
      donor = [add2, 0.1, sub2, 2, 7]
  
      gp = _Program(
          random_state=random_state, program=test_gp, **params
      )
  
      expected = ["mul", "div", 8, 1, "sub", 9, 0.5]
      assert [
          f.name if isinstance(f, _Function) else f
          for f in gp.reproduce()
      ] == expected
      assert gp.program == test_gp
      assert [
          f.name if isinstance(f, _Function) else f
          for f in gp.crossover(donor, random_state)[0]
      ] == ["sub", 2, 7]
      assert gp.program == test_gp
      expected = ["mul", "div", 8, 1, "sub", "sub", 3, 5, "add", 6, 3]
      assert [
          f.name if isinstance(f, _Function) else f
          for f in gp.subtree_mutation(random_state)[0]
      ] == expected
      assert gp.program == test_gp
      assert [
          f.name if isinstance(f, _Function) else f
          for f in gp.hoist_mutation(random_state)[0]
      ] == ["div", 8, 1]
      assert gp.program == test_gp
      expected = ["mul", "div", 8, 1, "sub", 9, 0.5]
      assert [
          f.name if isinstance(f, _Function) else f
          for f in gp.point_mutation(random_state)[0]
      ] == expected
      assert gp.program == test_gp
  
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 11 for calling a global function with example usage: test_genetic_operations() without return types