class_docstr: The asynchronous long polling client.
  
  Args:
      host_actor: handle to actor embedding LongPollHost.
      key_listeners: a dictionary mapping keys to
        callbacks to be called on state update for the corresponding keys.
      call_in_event_loop: an asyncio event loop
        to post the callback into.
code: def __init__(
      self,
      host_actor,
      key_listeners: Dict[KeyType, UpdateStateCallable],
      call_in_event_loop: AbstractEventLoop,
  ) -> None:
      assert len(key_listeners) > 0
      # We used to allow this to be optional, but due to Ray Client issue
      # we now enforce all long poll client to post callback to event loop
      # See https://github.com/ray-project/ray/issues/20971
      assert call_in_event_loop is not None
  
      self.host_actor = host_actor
      self.key_listeners = key_listeners
      self.event_loop = call_in_event_loop
      self.snapshot_ids: Dict[KeyType, int] = {
          key: -1 for key in self.key_listeners.keys()
      }
      self.is_running = True
  
      self._poll_next()
  
imports: import asyncio
  import logging
  import os
  import random
  from asyncio.events import AbstractEventLoop
  from collections import defaultdict
  from dataclasses import dataclass
  from enum import Enum, auto
  from typing import Any, Callable, DefaultDict, Dict, Optional, Set, Tuple, Union
  import ray
  from ray._private.utils import get_or_create_event_loop
  from ray.serve._private.common import ReplicaName
  from ray.serve._private.constants import SERVE_LOGGER_NAME
  from ray.serve._private.utils import format_actor_name
  from ray.serve.generated.serve_pb2 import ActorNameList
  from ray.serve.generated.serve_pb2 import EndpointInfo
  from ray.serve.generated.serve_pb2 import EndpointSet, LongPollRequest, LongPollResult
  from ray.serve.generated.serve_pb2 import UpdatedObject
  from ray.util import metrics
label_desc: Use image node_id 1 to create a new LongPollClient object  with example: obj = LongPollClient(host_actor, key_listeners, call_in_event_loop)