code: def _update_and_check_proxy_state_manager(
      proxy_state_manager: ProxyStateManager,
      node_ids: List[str],
      statuses: List[ProxyStatus],
      **kwargs,
  ):
      proxy_state_manager.update(**kwargs)
      proxy_states = proxy_state_manager._proxy_states
      assert all(
          [
              proxy_states[node_ids[idx]].status == statuses[idx]
              for idx in range(len(node_ids))
          ]
      ), [proxy_state.status for proxy_state in proxy_states.values()]
      return True
  
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 6 for calling a global function with example usage: _update_and_check_proxy_state_manager(proxy_state_manager, node_ids, statuses) and returns: True