code: def test_batch_mode_parameter(
      batch_mode: bool, expected: tp.List[str]
  ) -> None:
      func = ExampleFunction(dimension=1, number=3)
      optim = test_base.LoggingOptimizer(3)
      with patch.object(
          xpbase.OptimizerSettings, "instantiate", return_value=optim
      ):
          xp = xpbase.Experiment(
              func,
              optimizer="OnePlusOne",
              budget=10,
              num_workers=3,
              batch_mode=batch_mode,
          )
          xp._run_with_error()
          testing.printed_assert_equal(optim.logs, expected)
  
imports: import sys
  import contextlib
  from unittest.mock import patch
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import testing
  from nevergrad.optimization import test_base
  from nevergrad.functions import ArtificialFunction
  from nevergrad.functions.base import MultiExperiment
  from nevergrad.functions.test_base import ExampleFunction
  from nevergrad.functions.test_functionlib import DESCRIPTION_KEYS
  from .None import xpbase
label_desc: Use image node_id 7 for calling a global function with example usage: test_batch_mode_parameter(batch_mode, expected) without return types