code: def test_get_first_primes() -> None:
      # check first 10
      first_10 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
      for k in range(11):
          np.testing.assert_array_equal(
              sequences._get_first_primes(k), first_10[:k]
          )
      # generate a big number of them
      num = np.random.randint(1000, 1000000)
      output = sequences._get_first_primes(num)
      # verify the last value and one random value
      for value in [np.random.choice(output), output[-1]]:
          for k in range(3, 1 + int(np.sqrt(value)), 2):
              assert (
                  value % k
              ), f"Value {value} obtained with num={num} can be divided by {k}"
  
file_path: nevergrad/nevergrad/optimization/test_sequences.py
imports: import typing
  import numpy
  from ..common import testing
  from .None import sequences
  from .sequences import samplers
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_first_primes() without return types