code: def test_permutation_generator() -> None:
      np.random.seed(12)
      gen = sequences.HaltonPermutationGenerator(5, scrambling=True)
      value1 = list(gen.get_permutations_generator())
      value2 = list(gen.get_permutations_generator())
      gen = sequences.HaltonPermutationGenerator(5, scrambling=True)
      value3 = list(gen.get_permutations_generator())
      testing.printed_assert_equal(value1, value2)
      # testing.printed_assert_equal(value1[:3], [[0, 1], [0, 2, 1], [0, 4, 3, 2, 1]])  # previous: for the record
      testing.printed_assert_equal(
          value1[:3], [[0, 1], [0, 1, 2], [0, 2, 3, 1, 4]]
      )
      np.testing.assert_raises(
          AssertionError, testing.printed_assert_equal, value3, value2
      )
      #
      gen = sequences.HaltonPermutationGenerator(5, scrambling=False)
      value = list(gen.get_permutations_generator())
      testing.printed_assert_equal(
          value, [np.arange(p) for p in [2, 3, 5, 7, 11]]
      )
  
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 5 for calling a global function with example usage: test_permutation_generator() without return types