code: def test_ray_internal_kv_timeout(serve_ha):  # noqa: F811
      # Firstly make sure it's working
      kv1 = RayInternalKVStore()
      kv1.put("1", b"1")
      assert kv1.get("1") == b"1"
  
      # Kill the GCS
      ray.worker._global_node.kill_gcs_server()
  
      with pytest.raises(KVStoreError) as e:
          kv1.put("2", b"2")
      assert e.value.rpc_code in (
          grpc.StatusCode.UNAVAILABLE.value[0],
          grpc.StatusCode.DEADLINE_EXCEEDED.value[0],
      )
  
file_path: ray/python/ray/serve/tests/test_gcs_failure.py
imports: import os
  import sys
  import grpc
  import pytest
  import requests
  import ray
  from ray import serve
  from ray._private.test_utils import wait_for_condition
  from ray.serve._private.constants import SERVE_DEFAULT_APP_NAME
  from ray.serve._private.storage.kv_store import KVStoreError, RayInternalKVStore
  from ray.serve.context import _get_global_client
  from ray.tests.conftest import external_redis
label_desc: Use image node_id 2 for calling a global function with example usage: test_ray_internal_kv_timeout(serve_ha) without return types