code: def test_optimizers_suggest(
      name: str,
  ) -> None:  # pylint: disable=redefined-outer-name
      optimizer = registry[name](parametrization=4, budget=2)
      optimizer.suggest(np.array([12.0] * 4))
      candidate = optimizer.ask()
      try:
          optimizer.tell(candidate, 12)
          # The optimizer should recommend its suggestion, except for a few optimization methods:
          if name not in ["SPSA", "TBPSA", "StupidRandom"]:
              np.testing.assert_array_almost_equal(
                  optimizer.provide_recommendation().value, [12.0] * 4
              )
      except base.errors.TellNotAskedNotSupportedError:
          pass
  
file_path: nevergrad/nevergrad/optimization/test_suggest.py
imports: import pytest
  import numpy
  import sys
  from unittest import SkipTest
  import nevergrad
  import nevergrad.common.typing
  from nevergrad.common import testing
  from .None import base
  from .optimizerlib import registry
label_desc: Use image node_id 7 for calling a global function with example usage: test_optimizers_suggest(name) without return types