code: def test_gp_prune_nodes():
      new_gp = gp.GP()
  
      n_nodes = new_gp._prune_nodes(10)
  
      assert n_nodes == 10
  
      new_gp.prunning_ratio = 1
  
      n_nodes = new_gp._prune_nodes(10)
  
      assert n_nodes == 2
  
file_path: opytimizer/tests/opytimizer/optimizers/evolutionary/test_gp.py
imports: import sys
  import numpy
  from opytimizer.core import function
  from opytimizer.optimizers.evolutionary import gp
  from opytimizer.spaces import tree
label_desc: Use image node_id 3 for calling a global function with example usage: test_gp_prune_nodes() without return types