class_docstr: Wraps a unary DeploymentResponse or streaming DeploymentResponseGenerator.
  
  In the case of a unary DeploymentResponse, __anext__ will only ever return one
  result.
class_docstr_tok: ["Wraps","a","unary","DeploymentResponse","or","streaming","DeploymentResponseGenerator",".","In","the","case","of","a","unary","DeploymentResponse",",","__anext__","will","only","ever","return","one","result","."]
code: def __init__(
      self,
      response: Union[DeploymentResponse, DeploymentResponseGenerator],
      *,
      timeout_s: Optional[float] = None,
      disconnected_task: Optional[asyncio.Task] = None,
      result_callback: Optional[Callable[[Any], Any]] = None,
  ):
      super().__init__(
          timeout_s=timeout_s,
          disconnected_task=disconnected_task,
          result_callback=result_callback,
      )
      self._done = False
      self._response = response
  
file_path: ray/python/ray/serve/_private/proxy_response_generator.py
imports: import asyncio
  import logging
  import time
  from abc import ABC, abstractmethod
  from asyncio.tasks import FIRST_COMPLETED
  from typing import Any, Callable, Optional, Union
  from ray.serve._private.constants import SERVE_LOGGER_NAME
  from ray.serve._private.utils import calculate_remaining_timeout
  from ray.serve.handle import DeploymentResponse, DeploymentResponseGenerator
label_desc: Use image node_id 1 to create a new ProxyResponseGenerator object from inherited base classes: _ProxyResponseGeneratorBase with example: obj = ProxyResponseGenerator(response)