code: def test_is_ready_for_shutdown(all_nodes):
      """Test `is_ready_for_shutdown()` returns True the correct state.
  
      Before `shutdown()` is called, `is_ready_for_shutdown()` should return false. After
      `shutdown()` is called and all proxy actor are killed, `is_ready_for_shutdown()`
      should return true.
      """
      manager, cluster_node_info_cache = _create_proxy_state_manager(
          HTTPOptions(location=DeploymentMode.EveryNode)
      )
      cluster_node_info_cache.alive_nodes = all_nodes
  
      for node_id, node_ip_address in all_nodes:
          manager._proxy_states[node_id] = _create_proxy_state(
              status=ProxyStatus.HEALTHY,
              node_id=node_id,
          )
  
      # Ensure before shutdown, manager is not shutdown
      assert not manager.is_ready_for_shutdown()
  
      manager.shutdown()
  
      # Ensure after shutdown, manager is shutdown and all proxy states are shutdown
      def check_is_ready_for_shutdown():
          return manager.is_ready_for_shutdown()
  
      wait_for_condition(check_is_ready_for_shutdown)
  
imports: import json
  import time
  from typing import List, Tuple
  from unittest.mock import patch
  import pytest
  from ray._private.test_utils import wait_for_condition
  from ray.serve._private.cluster_node_info_cache import ClusterNodeInfoCache
  from ray.serve._private.common import ProxyStatus
  from ray.serve._private.constants import PROXY_HEALTH_CHECK_UNHEALTHY_THRESHOLD
  from ray.serve._private.proxy_state import ProxyState, ProxyStateManager, ProxyWrapper, ProxyWrapperCallStatus
  from ray.serve._private.test_utils import MockTimer
  from ray.serve._private.utils import Timer
  from ray.serve.config import DeploymentMode, HTTPOptions
  from ray.serve.schema import LoggingConfig
label_desc: Use image node_id 25 for calling a global function with example usage: test_is_ready_for_shutdown(all_nodes) and returns: manager