code: def _config(request: FixtureRequest):
      """Fixture that parametrizes the configuration used in the tests below."""
      test_name = request.function.__name__
  
      model_name: str = request.param  # type: ignore
  
      if model_name in NOT_WORKING:
          pytest.skip(reason=f"Model {model_name} is not supported.")
  
      model_type = ng.optimizers.registry[model_name]
  
      tweaks = MODEL_NAMES[model_name]
  
      if model_type.no_parallelization:
          num_workers = 1
      else:
          num_workers = 10
  
      TestNevergradOptimizer.config["model_name"] = model_name
      TestNevergradOptimizer.config["num_workers"] = num_workers
  
      mark = tweaks.get(test_name, None)
      current_phase: TestPhase = request.getfixturevalue("phase")
  
      if (
          mark
          and test_name == "test_seed_rng_init"
          and request.getfixturevalue("phase").n_trials > 0
          and mark in _deterministic_first_point.values()
      ):
          # Remove the mark, because The algo always gives back the same first trial, regardless of
          # the seed. This means that since `test_seed_rng_init` expects different seeds to give
          # different results, the test will fail if we're at the first phase, but pass in other
          # phases.
          mark = None
  
      if (
          model_name == "MultiScaleCMA"
          and test_name == "test_state_dict"
      ):
          # NOTE: Only fails at the optimization phase.
          if current_phase.n_trials == 0:
              mark = None
  
      if mark == "skip":
          pytest.skip(reason="Skipping test")
      elif isinstance(mark, pytest.MarkDecorator):
          if mark.name == "skip":
              pytest.skip(reason=mark.kwargs["reason"])
          else:
              request.node.add_marker(mark)
  
      start = TestNevergradOptimizer.max_trials
      if (
          model_name == "MultiScaleCMA"
          and test_name == "test_state_dict"
      ):
          TestNevergradOptimizer.max_trials = 20
  
      yield
  
      TestNevergradOptimizer.max_trials = start
  
file_path: orion/tests/unittests/algo/long/nevergrad/integration_test.py
imports: from __future__ import annotations
  from typing import Any, ClassVar
  import pytest
  from pytest import FixtureRequest, MarkDecorator
  from orion.algo.nevergradoptimizer import NOT_WORKING
  from orion.algo.nevergradoptimizer import NevergradOptimizer, import_optional
  from orion.testing.algo import BaseAlgoTests, TestPhase
  import nevergrad
label_desc: Use image node_id 2 for calling a global function with example usage: _config(request) without return types