code: def oneshot4(
      seed: tp.Optional[int] = None,
  ) -> tp.Iterator[Experiment]:
      # General experiment comparing one-shot optimizers, excluding those with "large" or "small"
      # in the name.
      seedg = create_seed_generator(seed)
      names = [
          "sphere",
          "cigar",
          "ellipsoid",
          "rosenbrock",
          "rastrigin",
      ]
      optims = sorted(
          x
          for x, y in optimizers.registry.items()
          if y.one_shot and "arg" not in x and "mal" not in x
      )
      functions = [
          ArtificialFunction(
              name,
              block_dimension=bd,
              num_blocks=n_blocks,
              useless_variables=bd * uv_factor * n_blocks,
          )
          for name in names
          for bd in [1, 4, 20]
          for uv_factor in [0, 10]
          for n_blocks in [1]
      ]
      for func in functions:
          for optim in optims:
              for budget in [30, 100, 3000]:
                  yield Experiment(
                      func,
                      optim,
                      budget=budget,
                      num_workers=1,
                      seed=next(seedg),
                  )
  
imports: import typing
  import numpy
  from nevergrad import optimizers
  from nevergrad.optimization.base import ConfiguredOptimizer
  from nevergrad.optimization import experimentalvariants
  from nevergrad.functions import ArtificialFunction
  from .xpbase import registry
  from .xpbase import create_seed_generator
  from .xpbase import Experiment
label_desc: Use image node_id 10 for calling a global function with example usage: oneshot4(seed) without return types