code: def test_grid_search():
      parameters = [
          sherpa.Choice("choice", ["a", "b"]),
          sherpa.Continuous("continuous", [2, 3]),
      ]
  
      alg = sherpa.algorithms.GridSearch(num_grid_points=2)
  
      suggestion = alg.get_suggestion(parameters)
      seen = set()
  
      while suggestion != sherpa.AlgorithmState.DONE:
          seen.add((suggestion["choice"], suggestion["continuous"]))
          suggestion = alg.get_suggestion(parameters)
  
      assert seen == {("a", 2.0), ("a", 3.0), ("b", 2.0), ("b", 3.0)}
  
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 4 for calling a global function with example usage: test_grid_search() without return types