code: def test_random_search():
      parameters = [
          sherpa.Continuous("a", [0, 1]),
          sherpa.Choice("b", ["x", "y", "z"]),
      ]
  
      rs = sherpa.algorithms.RandomSearch(max_num_trials=10)
      last_config = {}
  
      for i in range(10):
          config = rs.get_suggestion(parameters=parameters)
          assert config != last_config
          last_config = config
  
      assert (
          rs.get_suggestion(parameters=parameters)
          == sherpa.AlgorithmState.DONE
      )
  
      rs = sherpa.algorithms.RandomSearch()
      last_config = {}
  
      for _ in range(1000):
          config = rs.get_suggestion(parameters=parameters)
          assert config != last_config
          last_config = config
  
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 10 for calling a global function with example usage: test_random_search() without return types