code: def mock_endpoint_state() -> Tuple[EndpointState, Mock]:
      with patch(
          "ray.serve._private.long_poll.LongPollHost"
      ) as mock_long_poll:
          endpoint_state = EndpointState(
              kv_store=MockKVStore(),
              long_poll_host=mock_long_poll,
          )
          yield endpoint_state
  
file_path: ray/python/ray/serve/tests/unit/test_endpoint_state.py
imports: import sys
  from typing import Any, Tuple
  from unittest.mock import Mock, patch
  import pytest
  from ray.serve._private.endpoint_state import EndpointState
label_desc: Use image node_id 1 for calling a global function with example usage: mock_endpoint_state() without return types