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 cancelled(self) -> bool:
      return self._response.cancelled()
  
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 2 for calling the ProxyResponseGenerator obj's underlying member method code with example usage: obj.cancelled() and returns: self