code: def test_batch_limiter():
      class TestSuggestion(Searcher):
          def __init__(self, index):
              self.index = index
              self.returned_result = []
              super().__init__(metric="result", mode="max")
  
          def suggest(self, trial_id):
              self.index += 1
              return {"score": self.index}
  
          def on_trial_complete(self, trial_id, result=None, **kwargs):
              self.returned_result.append(result)
  
      searcher = TestSuggestion(0)
      limiter = ConcurrencyLimiter(
          searcher, max_concurrent=2, batch=True
      )
      assert limiter.suggest("test_1")["score"] == 1
      assert limiter.suggest("test_2")["score"] == 2
      assert limiter.suggest("test_3") is None
  
      limiter.on_trial_complete("test_1", {"result": 3})
      assert limiter.suggest("test_3") is None
      limiter.on_trial_complete("test_2", {"result": 3})
      assert limiter.suggest("test_3") is not None
  
file_path: ray/python/ray/tune/tests/test_searcher_utils.py
imports: import pytest
  from ray.tune.search import BasicVariantGenerator
  from ray.tune.search.repeater import Repeater
  from ray.tune.search import Searcher, ConcurrencyLimiter
  from ray.tune.search.search_generator import SearchGenerator
label_desc: Use image node_id 9 for calling a global function with example usage: test_batch_limiter() and returns: dict