def _retry_on_unavailable(exc):
 from grpc import StatusCode
 return (exc.code() == StatusCode.UNAVAILABLE)

def _retry_on_unavailable ( exc ) : from grpc import StatusCode return ( exc . code ( ) == StatusCode . UNAVAILABLE )
retry only errors whose status code is unavailable .