code: def test_inoculation() -> None:
      # DOC_INOCULATION_0
      optim = ng.optimizers.NGOpt(parametrization=2, budget=100)
      optim.suggest([12, 12])
      candidate = optim.ask()
      # equivalent to:
      candidate = optim.parametrization.spawn_child(new_value=[12, 12])
      # you can then use to tell the loss
      optim.tell(candidate, 2.0)
      # DOC_INOCULATION_1
      param = ng.p.Instrumentation(
          ng.p.Choice(["a", "b", "c"]),
          lr=ng.p.Log(lower=0.001, upper=1.0),
      )
      optim = ng.optimizers.NGOpt(parametrization=param, budget=100)
      optim.suggest("c", lr=0.02)
      candidate = optim.ask()
      # equivalent to:
      candidate = optim.parametrization.spawn_child(
          new_value=(("c",), {"lr": 0.02})
      )
      # you can then use to tell the loss
      optim.tell(candidate, 2.0)
  
file_path: nevergrad/nevergrad/optimization/test_doc.py
imports: import warnings
  import numpy
  import nevergrad
label_desc: Use image node_id 8 for calling a global function with example usage: test_inoculation() without return types