class_docstr: Context manager to set and get gRPC context.
  
  This class implements most of the methods from ServicerContext
  (see: https://grpc.github.io/grpc/python/grpc.html#grpc.ServicerContext). It's
  serializable and can be passed with the request to be used on the deployment.
class_docstr_tok: ["Context","manager","to","set","and","get","gRPC","context",".","This","class","implements","most","of","the","methods","from","ServicerContext","(","see",":","https",":","\/\/grpc.github.io\/grpc\/python\/grpc.html","#","grpc.ServicerContext",")",".","It's","serializable","and","can","be","passed","with","the","request","to","be","used","on","the","deployment","."]
docstr: Serve's internal method to set attributes on the gRPC context.
docstr_tok: ["Serve","'s","internal","method","to","set","attributes","on","the","gRPC","context","."]
code: def _set_on_grpc_context(
      self, grpc_context: grpc._cython.cygrpc._ServicerContext
  ):
      """Serve's internal method to set attributes on the gRPC context."""
      if self._code:
          grpc_context.set_code(self._code)
  
      if self._compression:
          grpc_context.set_compression(self._compression)
  
      if self._details:
          grpc_context.set_details(self._details)
  
      if self._trailing_metadata:
          grpc_context.set_trailing_metadata(self._trailing_metadata)
  
file_path: ray/python/ray/serve/grpc_util.py
imports: from typing import Any, Dict, List, Optional, Tuple
  import grpc
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 15 for calling the RayServegRPCContext obj's underlying member method code with example usage: obj._set_on_grpc_context(grpc_context) without return types