code: def test_node_evaluate():
      def _create_node(function_type):
          new_node = node.Node(name=function_type, category="FUNCTION")
          new_node_1 = node.Node(
              name="1", category="TERMINAL", value=np.array(1)
          )
          new_node_2 = node.Node(
              name="2", category="TERMINAL", value=np.array(1)
          )
  
          new_node.left = new_node_1
          new_node.right = new_node_2
          new_node_1.parent = new_node
          new_node_2.parent = new_node
  
          return new_node
  
      new_node = _create_node("SUM")
      assert node._evaluate(new_node) == 2
  
      new_node = _create_node("SUB")
      assert node._evaluate(new_node) == 0
  
      new_node = _create_node("MUL")
      assert node._evaluate(new_node) == 1
  
      new_node = _create_node("DIV")
      assert node._evaluate(new_node) == 1
  
      new_node = _create_node("EXP")
      assert np.round(node._evaluate(new_node)) == 3
  
      new_node = _create_node("SQRT")
      assert node._evaluate(new_node) == 1
  
      new_node = _create_node("LOG")
      assert node._evaluate(new_node) == 0
  
      new_node = _create_node("ABS")
      assert node._evaluate(new_node) == 1
  
      new_node = _create_node("SIN")
      assert np.round(node._evaluate(new_node)) == 1
  
      new_node = _create_node("COS")
      assert np.round(node._evaluate(new_node)) == 1
  
imports: import numpy
  from opytimizer.core import node
label_desc: Use image node_id 24 for calling a global function with example usage: test_node_evaluate() and returns: new_node