code: def test_seed_generator(
      seed: tp.Optional[int],
      randsize: int,
      expected: tp.List[tp.Optional[int]],
  ) -> None:
      output = []
      generator = xpbase.create_seed_generator(seed)
      for _ in range(4):
          if randsize:  # call the standard random generator
              np.random.normal(0, 1, size=randsize)
          value = next(generator)
          output.append(value if value is None else value % 1000)
      np.testing.assert_array_equal(output, 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 6 for calling a global function with example usage: test_seed_generator(seed, randsize, expected) without return types