code: def test_repeat_grid_search():
      parameters = [
          sherpa.Choice("a", [1, 2]),
          sherpa.Choice("b", ["a", "b"]),
      ]
  
      alg = sherpa.algorithms.GridSearch()
      alg = sherpa.algorithms.Repeat(algorithm=alg, num_times=3)
  
      suggestion = alg.get_suggestion(parameters)
      seen = list()
  
      while suggestion != sherpa.AlgorithmState.DONE:
          seen.append((suggestion["a"], suggestion["b"]))
          suggestion = alg.get_suggestion(parameters)
  
      expected_params = [(1, "a"), (1, "b"), (2, "a"), (2, "b")]
  
      expected = list(
          itertools.chain.from_iterable(
              itertools.repeat(x, 3) for x in expected_params
          )
      )
  
      print(sorted(expected))
      print(sorted(seen))
  
      assert sorted(expected) == sorted(seen)
  
imports: from __future__ import absolute_import
  import collections
  import pandas
  import numpy
  import sherpa
  import logging
  import itertools
  import pytest
  from testing_utils import *
label_desc: Use image node_id 12 for calling a global function with example usage: test_repeat_grid_search() without return types