class_docstr: Queue enables polling for received or sent messages.
  
  This class assumes a single consumer of the queue (concurrent calls to
  `get_messages_nowait` and `wait_for_message` is undefined behavior).
  
  This class implements the ASGI `Send` interface.
code: def __init__(self):
      self._message_queue = asyncio.Queue()
      self._new_message_event = asyncio.Event()
      self._closed = False
  
imports: import asyncio
  import inspect
  import json
  import logging
  import pickle
  import socket
  from dataclasses import dataclass
  from typing import Any, List, Optional, Tuple, Type
  import starlette
  from fastapi.encoders import jsonable_encoder
  from starlette.types import ASGIApp, Message, Receive, Scope, Send
  from uvicorn.config import Config
  from uvicorn.lifespan.on import LifespanOn
  from ray._private.pydantic_compat import IS_PYDANTIC_2
  from ray.actor import ActorHandle
  from ray.serve._private.constants import SERVE_LOGGER_NAME
  from ray.serve._private.utils import serve_encoders
  from ray.serve.exceptions import RayServeException
label_desc: Use image node_id 1 to create a new MessageQueue object from inherited base classes: Send with example: obj = MessageQueue()