code: def test_no_retry_auth():
      e = mock.MagicMock(spec=requests.HTTPError)
      e.response = mock.MagicMock(spec=requests.Response)
      for status_code in (400, 409):
          e.response.status_code = status_code
          assert not util.no_retry_auth(e)
      e.response.status_code = 401
      e.response.reason = "Unauthorized"
      with pytest.raises(errors.AuthenticationError):
          util.no_retry_auth(e)
      e.response.status_code = 403
      e.response.reason = "Forbidden"
      with mock.patch("wandb.run", mock.MagicMock()):
          with pytest.raises(wandb.CommError):
              util.no_retry_auth(e)
      e.response.status_code = 404
      with pytest.raises(wandb.CommError):
          util.no_retry_auth(e)
  
      e.response = None
      assert util.no_retry_auth(e)
      e = ValueError("foo")
      assert util.no_retry_auth(e)
  
imports: import datetime
  import os
  import platform
  import random
  import sys
  import tarfile
  import tempfile
  import time
  from unittest import mock
  import matplotlib.pyplot
  import numpy
  import plotly
  import pytest
  import requests
  import wandb
  import wandb.errors
  from wandb import util
label_desc: Use image node_id 35 for calling a global function with example usage: test_no_retry_auth() without return types