code: def test_async_call_with_retries_fails_immediately_on_permanent_error(
      self,
  ):
      # Setup: Server which fails with an ISE.
      def handler(_, context):
          context.abort(grpc.StatusCode.INTERNAL, "death_ray")
  
      server = TestGrpcServer(handler)
      with server.run() as client:
          # Execute `async_call_with_retries`
          future = grpc_util.async_call_with_retries(
              client.TestRpc,
              make_request(42),
          )
          # Expect that the future raises an Exception which is the
          # right type and carries the right message.
          with self.assertRaises(grpc.RpcError) as raised:
              future.result(2)
          self.assertEqual(
              grpc.StatusCode.INTERNAL, raised.exception.code()
          )
          self.assertEqual("death_ray", raised.exception.details())
  
imports: import contextlib
  import hashlib
  import threading
  import time
  from concurrent import futures
  import grpc
  from tensorboard.util import grpc_util
  from tensorboard.util import grpc_util_test_pb2
  from tensorboard.util import grpc_util_test_pb2_grpc
  from tensorboard.util import test_util
  from tensorboard import test
  from tensorboard import version
label_desc: Use image node_id 3 for calling the AsyncCallWithRetriesTest obj's underlying member method code with example usage: obj.test_async_call_with_retries_fails_immediately_on_permanent_error() without return types