code: def test_call_with_retries_fails_immediately_on_permanent_error(self):
      def handler(_, context):
          context.abort(grpc.StatusCode.INTERNAL, "foo")
  
      server = TestGrpcServer(handler)
      with server.run() as client:
          with self.assertRaises(grpc.RpcError) as raised:
              grpc_util.call_with_retries(
                  client.TestRpc, make_request(42)
              )
      self.assertEqual(
          grpc.StatusCode.INTERNAL, raised.exception.code()
      )
      self.assertEqual("foo", 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 2 for calling the CallWithRetriesTest obj's underlying member method code with example usage: obj.test_call_with_retries_fails_immediately_on_permanent_error() without return types