code: def test_response_cache_invalidate():
      """
      Check that ordered response cache invalidate works as expected
      """
      cache = OrderedResponseCache()
      e = RuntimeError("SomeError")
      # No pending entries, cache should be valid
      assert not cache.invalidate(e)
      # No entry for 123 yet
      assert cache.check_cache(123) is None
      # this should invalidate the entry for 123
      assert cache.invalidate(e)
      assert cache.check_cache(123) == e
      assert cache.invalidate(e)
  
file_path: ray/python/ray/tests/test_response_cache.py
imports: from ray.util.client.common import _id_is_newer, ResponseCache, OrderedResponseCache, INT32_MAX
  import threading
  import time
  import pytest
label_desc: Use image node_id 10 for calling a global function with example usage: test_response_cache_invalidate() without return types