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: Sets the value to be used as status code upon RPC completion.
  
  This method need not be called by method implementations if they wish
  the gRPC runtime to determine the status code of the RPC.
  
  Args:
    code: A StatusCode object to be sent to the client.
docstr_tok: ["Sets","the","value","to","be","used","as","status","code","upon","RPC","completion",".","This","method","need","not","be","called","by","method","implementations","if","they","wish","the","gRPC","runtime","to","determine","the","status","code","of","the","RPC",".","Args",":","code",":","A","StatusCode","object","to","be","sent","to","the","client","."]
code: def set_code(self, code: grpc.StatusCode):
      """Sets the value to be used as status code upon RPC completion.
  
      This method need not be called by method implementations if they wish
      the gRPC runtime to determine the status code of the RPC.
  
      Args:
        code: A StatusCode object to be sent to the client.
      """
      self._code = code
  
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 10 for calling the RayServegRPCContext obj's underlying member method code with example usage: obj.set_code(code) without return types