code: def test_proxy_actor_unhealthy_during_draining(
      all_nodes, number_of_worker_nodes
  ):
      """Test the state transition from DRAINING to UNHEALTHY for the proxy actor."""
      manager, cluster_node_info_cache = _create_proxy_state_manager(
          HTTPOptions(location=DeploymentMode.EveryNode)
      )
      cluster_node_info_cache.alive_nodes = all_nodes
  
      worker_node_id = None
      for node_id, node_ip_address in all_nodes:
          manager._proxy_states[node_id] = _create_proxy_state(
              status=ProxyStatus.STARTING,
              node_id=node_id,
          )
          if node_id != HEAD_NODE_ID:
              worker_node_id = node_id
  
      node_ids = [node_id for node_id, _ in all_nodes]
  
      # All nodes are target proxy nodes
      proxy_nodes = set(node_ids)
      wait_for_condition(
          condition_predictor=_update_and_check_proxy_state_manager,
          proxy_state_manager=manager,
          node_ids=node_ids,
          statuses=[ProxyStatus.HEALTHY] * (number_of_worker_nodes + 1),
          proxy_nodes=proxy_nodes,
      )
  
      # No target proxy nodes
      proxy_nodes = set()
  
      # Head node proxy should continue to be HEALTHY.
      # Worker node proxy should turn DRAINING.
      wait_for_condition(
          condition_predictor=_update_and_check_proxy_state_manager,
          proxy_state_manager=manager,
          node_ids=node_ids,
          statuses=[ProxyStatus.HEALTHY]
          + [ProxyStatus.DRAINING] * number_of_worker_nodes,
          proxy_nodes=proxy_nodes,
      )
  
      # Kill the draining proxy actor
      manager._proxy_states[
          worker_node_id
      ]._actor_proxy_wrapper.health = (
          ProxyWrapperCallStatus.FINISHED_FAILED
      )
  
      def check_worker_node_proxy_actor_is_removed():
          manager.update(proxy_nodes=proxy_nodes)
          return len(manager._proxy_states) == 1
  
      wait_for_condition(
          condition_predictor=check_worker_node_proxy_actor_is_removed
      )
      assert (
          manager._proxy_states[HEAD_NODE_ID].status
          == ProxyStatus.HEALTHY
      )
  
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 23 for calling a global function with example usage: test_proxy_actor_unhealthy_during_draining(all_nodes, number_of_worker_nodes) and returns: unknown