code: def test_pruning_calls() -> None:
      opt = ng.optimizers.CMA(50, budget=2000)
      # worst case scenario for pruning is constant:
      # it should not keep everything or that will make computation time explode
      opt.minimize(constant)
      assert isinstance(opt.pruning, utils.Pruning)
      assert opt.pruning._num_prunings < 4
  
imports: import warnings
  from pathlib import Path
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import testing
  import nevergrad
  from .None import optimizerlib
  from .None import experimentalvariants
  from .None import base
  from .None import utils
  from .None import callbacks
label_desc: Use image node_id 9 for calling a global function with example usage: test_pruning_calls() without return types