code: def test_network_failure(
      head: mock.MagicMock,
      run: mock.MagicMock,
  ):
      head.side_effect = requests.ConnectionError()
      with pytest.raises(requests.ConnectionError):
          login.Auth()._run_server()
          run.assert_not_called()
  
      head.side_effect = requests.RequestException()
      with pytest.raises(requests.RequestException):
          login.Auth()._run_server()
          run.assert_not_called()
  
file_path: pytorch-lightning/tests/tests_app/utilities/test_login.py
imports: import os
  from unittest import mock
  import pytest
  import requests
  from lightning.app.utilities import login
label_desc: Use image node_id 7 for calling a global function with example usage: test_network_failure(head, run) without return types