code: def test_function_in_program():
      """Check that using a custom function in a program works"""
  
      def logic(x1, x2, x3, x4):
          return np.where(x1 > x2, x3, x4)
  
      logical = make_function(function=logic, name="logical", arity=4)
      function_set = ["add", "sub", "mul", "div", logical]
      est = SymbolicTransformer(
          generations=2,
          population_size=2000,
          hall_of_fame=100,
          n_components=10,
          function_set=function_set,
          parsimony_coefficient=0.0005,
          max_samples=0.9,
          random_state=0,
      )
      est.fit(diabetes.data[:300, :], diabetes.target[:300])
  
      formula = est._programs[0][3].__str__()
      expected_formula = (
          "add(X3, logical(div(X5, sub(X5, X5)), "
          "add(X9, -0.621), X8, X4))"
      )
      assert expected_formula == formula
  
file_path: gplearn/gplearn/tests/test_functions.py
imports: import pickle
  import numpy
  from numpy import maximum
  from sklearn.datasets import load_diabetes, load_breast_cancer
  from sklearn.utils._testing import assert_raises
  from sklearn.utils.validation import check_random_state
  from gplearn.functions import _protected_sqrt, make_function
  from gplearn.genetic import SymbolicRegressor, SymbolicTransformer
  from gplearn.genetic import SymbolicClassifier
label_desc: Use image node_id 2 for calling a global function with example usage: test_function_in_program() and returns: np