code: def check_experiment(
      maker: tp.Any, short: bool = False, skip_seed: bool = False
  ) -> None:
      """Randomized check of seedability for 8 first elements
      This test does not prove the complete seedability of the generator!  (would be way too slow)
      """
      # we use "maker: Any" because signature for one or the other case (seedable or not) is way too complex, and won't help much here...
      random_seed = np.random.randint(1000)
      signature = inspect.signature(maker)
      if not signature.parameters:
          return  # not designed to be seedable
      # draw twice with same random seed_generator and once with a different one
      results = []
      algo = "OnePlusOne"  # for simplifying the test
      rl.agents.TorchAgentFunction._num_test_evaluations = (
          1  # patch for faster evaluation
      )
      for seed in (
          [random_seed]
          if skip_seed
          else [random_seed, random_seed, random_seed + 1]
      ):
          print(
              f"\nStarting with {seed % 100}"
          )  # useful debug info when this test fails
          xps = list(
              itertools.islice(maker(seed), 0, 1 if short else 2)
          )
          simplified = [
              Experiment(
                  xp.function,
                  algo,
                  budget=2,
                  num_workers=min(2, xp.optimsettings.num_workers),
                  seed=xp.seed,
              )
              for xp in xps
          ]
          # compute in any order
          np.random.shuffle(simplified)  # type: ignore
          selector = Selector(data=[xp.run() for xp in simplified])
          results.append(
              Selector(selector.loc[:, ["loss", "seed", "error"]])
          )  # elapsed_time can vary...
          assert results[-1].unique("error") == {
              ""
          }, f"An error was raised during optimization:\n{results[-1]}"
      if skip_seed:
          return
      results[0].assert_equivalent(
          results[1], f"Non identical outputs for seed={random_seed}"
      )
      np.testing.assert_raises(
          AssertionError,
          results[1].assert_equivalent,
          results[2],
          f"Identical output with different seeds (seed={random_seed})",
      )
  
imports: import inspect
  import itertools
  import os
  import platform
  import typing
  from pathlib import Path
  from unittest import SkipTest
  import pytest
  import numpy
  from nevergrad.optimization import registry
  import nevergrad.functions.base
  from nevergrad.functions.mlda import datasets
  from nevergrad.functions import rl
  from nevergrad.common import testing
  from nevergrad.common import tools
  from .xpbase import Experiment
  from .utils import Selector
  from .None import experiments
  from .None import optgroups
label_desc: Use image node_id 5 for calling a global function with example usage: check_experiment(maker, short, skip_seed) without return types