code: def test_local_grid_searcher_categorical():
      search_space = dict(
          a=space.Categorical("a", 7, ["hello", 2]),
          b=space.Categorical(12, 15),
      )
  
      searcher = LocalGridSearcher(search_space=search_space)
  
      expected_config_1 = {"b": 12, "a": "a"}
      expected_config_2 = {"b": 15, "a": "a"}
      expected_config_3 = {"b": 12, "a": 7}
      expected_config_4 = {"b": 15, "a": 7}
      expected_config_5 = {"b": 12, "a": ["hello", 2]}
      expected_config_6 = {"b": 15, "a": ["hello", 2]}
  
      config1 = searcher.get_config()
      searcher.update(config1, reward=0.2)
      assert searcher.get_reward(config1) == 0.2
      assert searcher.get_best_reward() == 0.2
      assert searcher.get_best_config() == config1
  
      config2 = searcher.get_config()
  
      config3 = searcher.get_config()
  
      config4 = searcher.get_config()
      searcher.update(config4, reward=0.1)
      assert searcher.get_reward(config4) == 0.1
      assert searcher.get_best_reward() == 0.2
      assert searcher.get_best_config() == config1
      searcher.update(config4, reward=0.5)
      assert searcher.get_reward(config4) == 0.5
      assert searcher.get_best_reward() == 0.5
      assert searcher.get_best_config() == config4
  
      config5 = searcher.get_config()
  
      config6 = searcher.get_config()
  
      assert expected_config_1 == config1
      assert expected_config_2 == config2
      assert expected_config_3 == config3
      assert expected_config_4 == config4
      assert expected_config_5 == config5
      assert expected_config_6 == config6
  
      assert len(searcher._results) == 2
  
      try:
          searcher.get_config()
      except AssertionError:
          pass
      else:
          raise AssertionError(
              "GridSearcher should error due to being out of configs"
          )
  
imports: from autogluon.common import space
  from autogluon.core.searcher import LocalGridSearcher
label_desc: Use image node_id 1 for calling a global function with example usage: test_local_grid_searcher_categorical() without return types